Waraxe IT Security Portal
Login or Register
November 16, 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: 53
Members: 0
Total: 53
Full disclosure
SEC Consult SA-20241112-0 :: Multiple vulnerabilities in Siemens Energy Omnivise T3000 (CVE-2024-38876, CVE-2024-38877, CVE-2024-38878, CVE-2024-38879)
Security issue in the TX Text Control .NET Server for ASP.NET.
SEC Consult SA-20241107-0 :: Multiple Vulnerabilities in HASOMED Elefant and Elefant Software Updater
Unsafe eval() in TestRail CLI
4 vulnerabilities in ibmsecurity
32 vulnerabilities in IBM Security Verify Access
xlibre Xnest security advisory & bugfix releases
APPLE-SA-10-29-2024-1 Safari 18.1
SEC Consult SA-20241030-0 :: Query Filter Injection in Ping Identity PingIDM (formerly known as ForgeRock Identity Management) (CVE-2024-23600)
SEC Consult SA-20241023-0 :: Authenticated Remote Code Execution in Multiple Xerox printers (CVE-2024-6333)
APPLE-SA-10-28-2024-8 visionOS 2.1
APPLE-SA-10-28-2024-7 tvOS 18.1
APPLE-SA-10-28-2024-6 watchOS 11.1
APPLE-SA-10-28-2024-5 macOS Ventura 13.7.1
APPLE-SA-10-28-2024-4 macOS Sonoma 14.7.1
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> All other security holes -> a question for the pro's
Post new topicReply to topic View previous topic :: View next topic
a question for the pro's
PostPosted: Tue Aug 01, 2006 4:18 pm Reply with quote
Zipper_
Active user
Active user
Joined: Aug 03, 2005
Posts: 29




gbar asked a question in one of his forums posts regarding file chmod of dir's such as /,/home,/home/cpanel etc in his question he asked if it were possible to maybe change it via c99sh in my opinion and knowledge of c99sh i wouldnt think that is possible although i am very much interested in the idea of maybe remotley injecting a command via shell maybe to alter these value's so the dir/s can become usefull does anyone with a little more linux/user privledge knowledge be able to enlighten us somewhat on this matter
View user's profile Send private message
PostPosted: Wed Aug 02, 2006 11:52 am Reply with quote
Heintz
Valuable expert
Valuable expert
Joined: Jun 12, 2004
Posts: 88
Location: Estonia/Sweden




if apache runs as a high privileged user like root and php is badly configured then yes. 'whoami' shell cmd to find out what user you are.

anyway i took a look at the c99sh source and its half-lie to say it 'bypasses' safe mode. to do that it would have to exploit the php binary and gain control over it, and it does not do that. seems to me its just a form-based comfortable interface to the 'exec' functions to run cmds, and to make db queries and move files which you are privileged to do etc.
anyway on correctly configured machine the 'exec' functions are disabled or at least the safe mode exec dir is not writable etc. thus c99sh doesnt help you there, So a simple php interface . shure its good to have one around once you're running own php code but not to expect that it does anything magical like bypass all privileges known to common sense.

_________________
AT 14:00 /EVERY:1 DHTTP /oindex.php www.waraxe.us:80 | FIND "SA#037" 1>Nul 2>&1 & IF ERRORLEVEL 0 "c:program filesApache.exe stop & DSAY alarmaaa!"
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
thought asmuvh
PostPosted: Wed Aug 02, 2006 12:30 pm Reply with quote
Zipper_
Active user
Active user
Joined: Aug 03, 2005
Posts: 29




probably just a marketing scam lol when i tried to view / it wouldnt let me so i didnt think it really worked that great thanks for your reply heintz
View user's profile Send private message
PostPosted: Wed Aug 02, 2006 12:53 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




First of all, if "safe_mode" is enabled, then all the shell access functions in php will be disabled:

http://ee2.php.net/manual/en/features.safe-mode.functions.php

Only function, that can be used in some degree for shell access,
seems to be "popen()".

Now, there are many php security bugs disovered in older php versions, which will help to abuse safe_mode restricions. So, if it is OLDER php version, then MAYBE safe_mode can be fooled. But if server has newer php version installed, then I dont believe in miracles (like c99 shell) - if there is some clever srcipt to safe_mode bypass, then it MUST to be yet unpublished php security hole and it will be patched soon.

So, safe_mode can be real pain in the a$$ for attacker Smile
Now let's assume, that safe_mode is off or attacker found another way to shell access (for example through cgi/pl scripts). Then of course attacker will have minimal permissions level in server, if the box is configured properly. "Whoami" will show "nobody" or "apache" ...
What next then?? Simple - try to use local root exploits -
IF you can upload files to server and write them to some directory (like in "/tmp" for example) and if you can use shell commands for c compilation, then jjust upload some root exploits, written in "c" language and try to get r00t! If you can't access c compiler, then find out exact version of the server operating system and try to use precompiled exploits from your own computer, using same op system/c compiler.

Final words - typical steps in webserver hacking:

1. finding way to abuse php/pl/cgi/py/ect scripts to do the thing, attacker need. For defacement or just website destruction this step can be enough.
Example - "drop www_database" in sql injection can devastate all the website, if sql user permissions are too high.
2. finding way to get shell access with "nobody/apache" privilege.
3. using local root exlpoit to get r00t shell access.
4. cleaning logs and wiping all other traces.
5. installing backdoors/rootkits
6. try to use sniffer and escalate attack foothold in compromised system Smile
View user's profile Send private message Send e-mail Visit poster's website
dang
PostPosted: Fri Aug 04, 2006 2:45 pm Reply with quote
Zipper_
Active user
Active user
Joined: Aug 03, 2005
Posts: 29




thats some scarey shit id hate to be the one on the other end of your temper (laughs) id say i need a little more knowledge in the field of root kits and local root exploits as i havent dabbled into that yet i try most of my exploits on (booter sites) people whom make websites to host (booters) that disconnect innocent people from chat via flooding thier im's with malicious packets sent via server to fool yahoo into rebooting etc they all claim to be leet but just boot innocent people and make the same style sites thiers about 100 odd booter sites all doing hosting and looking the same Smile) but thats enuff aabout them its late anf thanks waraxe that made things a little clearer
View user's profile Send private message
PostPosted: Sat Aug 05, 2006 8:59 am Reply with quote
gbar
Regular user
Regular user
Joined: Jan 20, 2006
Posts: 9




sorry zipper, never got around to pm-ing anyone to ask Very Happy

thanks for doing it for me!
View user's profile Send private message
np....
PostPosted: Sat Aug 05, 2006 12:19 pm Reply with quote
Zipper_
Active user
Active user
Joined: Aug 03, 2005
Posts: 29




i was very much interested in the answer anyways
View user's profile Send private message
a question for the pro's
www.waraxe.us Forum Index -> All other security holes
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 1

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.044 Seconds