![](themes/Helius/images/top_left.gif) |
|
![](themes/Helius/images/top_right.gif) |
![](themes/Helius/forums/images/logo1.gif) |
|
![](themes/Helius/forums/images/logo2.gif) |
IT Security and Insecurity Portal |
|
![](themes/Helius/forums/images/top_left.gif) |
a question for the pro's |
![](themes/Helius/forums/images/top_right.gif) |
Posted: Tue Aug 01, 2006 4:18 pm |
|
|
Zipper_ |
Active user |
![Active user Active user](modules/Forums/images/ranks/rang3.gif)
![](modules/Forums/images/avatars/gallery/blank.gif) |
|
Joined: Aug 03, 2005 |
Posts: 29 |
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/post_corner.gif) |
|
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 |
|
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/top_left.gif) |
|
![](themes/Helius/forums/images/top_right.gif) |
Posted: Wed Aug 02, 2006 11:52 am |
|
|
Heintz |
Valuable expert |
![Valuable expert Valuable expert](modules/Forums/images/ranks/rang5.gif)
![](https://www.waraxe.us/images/blank.gif) |
|
Joined: Jun 12, 2004 |
Posts: 88 |
Location: Estonia/Sweden |
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/post_corner.gif) |
|
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!" |
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/top_left.gif) |
thought asmuvh |
![](themes/Helius/forums/images/top_right.gif) |
Posted: Wed Aug 02, 2006 12:30 pm |
|
|
Zipper_ |
Active user |
![Active user Active user](modules/Forums/images/ranks/rang3.gif)
![](modules/Forums/images/avatars/gallery/blank.gif) |
|
Joined: Aug 03, 2005 |
Posts: 29 |
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/post_corner.gif) |
|
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 |
|
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/top_left.gif) |
|
![](themes/Helius/forums/images/top_right.gif) |
Posted: Wed Aug 02, 2006 12:53 pm |
|
|
waraxe |
Site admin |
![Site admin Site admin](modules/Forums/images/ranks/rangad.gif)
![](modules/Forums/images/avatars/gallery/091.gif) |
|
Joined: May 11, 2004 |
Posts: 2407 |
Location: Estonia, Tartu |
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/post_corner.gif) |
|
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
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](modules/Forums/images/smiles/icon_smile.gif) |
|
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/top_left.gif) |
dang |
![](themes/Helius/forums/images/top_right.gif) |
Posted: Fri Aug 04, 2006 2:45 pm |
|
|
Zipper_ |
Active user |
![Active user Active user](modules/Forums/images/ranks/rang3.gif)
![](modules/Forums/images/avatars/gallery/blank.gif) |
|
Joined: Aug 03, 2005 |
Posts: 29 |
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/post_corner.gif) |
|
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 ) but thats enuff aabout them its late anf thanks waraxe that made things a little clearer |
|
|
|
|
Posted: Sat Aug 05, 2006 8:59 am |
|
|
gbar |
Regular user |
![Regular user Regular user](modules/Forums/images/ranks/rang2.gif)
![](modules/Forums/images/avatars/gallery/blank.gif) |
|
Joined: Jan 20, 2006 |
Posts: 9 |
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/post_corner.gif) |
|
sorry zipper, never got around to pm-ing anyone to ask
thanks for doing it for me! |
|
|
|
|
![](themes/Helius/forums/images/top_left.gif) |
np.... |
![](themes/Helius/forums/images/top_right.gif) |
Posted: Sat Aug 05, 2006 12:19 pm |
|
|
Zipper_ |
Active user |
![Active user Active user](modules/Forums/images/ranks/rang3.gif)
![](modules/Forums/images/avatars/gallery/blank.gif) |
|
Joined: Aug 03, 2005 |
Posts: 29 |
|
|
|
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/spacer.gif) |
![](themes/Helius/forums/images/post_corner.gif) |
|
i was very much interested in the answer anyways |
|
|
|
|
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
|
|
|
Powered by phpBB © 2001-2008 phpBB Group
|
|
|
|
|