SlideShare a Scribd company logo
1 of 43
AppSec USA 2014 
Denver, Colorado 
Customizing Burp Suite 
Getting the Most out of Burp Extensions
2 
August Detlefsen 
Senior Application Security Consultant 
Author 
• augustd@codemagi.com 
• @codemagi 
• http://www.codemagi.com/blog
3 
Burp Suite 
• Burp Suite is a powerful tool for performing 
security assessments 
• Burp Plugin API allows new features to be 
added 
www.portswigger.net/burp/extender
4 
What Can I Do With Plugins? 
• Passive Scanning 
• Active Scanning 
• Alter/append requests 
• Define Insertion Points for Scanner/Intruder 
• Create new payload types 
• Automate Authentication 
• Much, Much More
5 
Prerequisites 
• Burp Suite Pro v 1.5.x+ 
• Java 1.6.x+ 
• NetBeans 
• Other programming languages 
– Jython 
– JRuby
6 
Creating An Extension 
• Download the Extender API from Portswigger: 
portswigger.net/burp/extender/api/ 
burp_extender_api.zip 
• Or export the API from within Burp
7 
Creating an Extension 
• Create a new project with existing sources:
8 
Creating an Extension 
• Create the BurpExtender class 
– In package ‘burp’ 
– Implement IBurpExtender
9 
Creating an Extension
10 
Creating an Extension 
• Implement registerExtenderCallbacks
11 
Load the Extension into Burp Suite
12 
Building a Passive Scanner 
Passive Scanning 
• Search responses for problematic values 
• Built-in passive scans 
– Credit card numbers 
– Known passwords 
– Missing headers
13 
Building a Passive Scanner 
Passive Scanning – Room for Improvement 
• Error Messages 
• Software Version Numbers
14 
Building a Passive Scanner 
Building a Passive Scanner 
• Implement the IScannerCheck interface: 
• Register the extension as a scanner:
15 
Building a Passive Scanner 
IScannerCheck.doPassiveScan()
16 
Building a Passive Scanner 
IScannerCheck.doPassiveScan()
17 
Building a Passive Scanner 
IScannerCheck.consolidateDuplicateIssues() 
• Ensure an issue is only posted to scanner once
18 
Building a Passive Scanner 
IScannerCheck.doActiveScan() 
• Only needed for active scans
19 
Building an Active Scanner 
Active Scanning 
• Issue requests containing attacks 
• Look for indication of success in response 
• Built-In Active Scans 
– XSS 
– SQL Injection 
– Path Traversal 
– etc
20 
Building an Active Scanner 
IScannerCheck.doActiveScan()
21 
Building an Active Scanner 
Insertion Points 
• Locations of parameters in request 
• Contain data the server will act upon
22 
Building an Active Scanner
23 
Building an Active Scanner
24 
Building an Active Scanner 
Defining Insertion Points 
• Implement IScannerInsertionPointProvider 
– getInsertionPoints() 
• Register as an insertion point provider
25 
Building an Active Scanner 
BurpExtender.getInsertionPoints()
26 
Building an Active Scanner
27 
Building an Active Scanner 
Viewing Insertion Points 
• Add menu option to send request to Intruder 
• Implement IContextMenuFactory 
– createMenuItems() 
• Register as a menu factory
28 
Building an Active Scanner 
BurpExtender.createMenuItems()
29 
Building an Active Scanner 
MenuItemListener
30 
Building an Active Scanner 
BurpExtender.sendGWTToIntruder()
31 
Building an Active Scanner
32 
Building an Active Scanner
33 
Modifying Requests 
Modifying Requests 
• Add custom headers 
• Add signatures 
• CSRF tokens
34 
Modifying Requests 
Modifying Requests 
• Implement IHttpListener 
– processHttpMessage() 
• Register as an HTTP Listener
35 
Modifying a Request 
BurpExtender.processHttpMessage()
36 
Modifying a Request 
BurpExtender.signRequest()
37 
Utilities 
Debugging 
• callbacks.printOutput(String) 
• callbacks.printError(String)
38 
Utilities
39 
Utilities 
Debugging – Stack Traces 
• Exception.printStackTrace() 
• Get the error OutputStream 
• Print a stack trace to the stream
40 
Utilities
41 
Summary 
• Setup 
• Passive Scanning 
• Active Scanning 
• Handling custom request types 
• Utilities
42 
Resources 
Extension Downloads 
• Download Extensions at: 
www.codemagi.com/downloads 
• Source code on Google Code
43 
Build Extensions! 
Customize YOUR Hacking! 
Profit!

More Related Content

What's hot

API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.Andrey Oleynik
 
Security Exploit of Business Logic Flaws, Business Logic Attacks
Security Exploit of Business Logic Flaws, Business Logic AttacksSecurity Exploit of Business Logic Flaws, Business Logic Attacks
Security Exploit of Business Logic Flaws, Business Logic AttacksMarco Morana
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesMarco Morana
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfHacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfMatt Tesauro
 
Rest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityRest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityMohammed Fazuluddin
 
Introduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & DefenseIntroduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & DefenseSurya Subhash
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & ActuatorsVMware Tanzu
 
Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request ForgeryTony Bibbs
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing SwaggerTony Tam
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionSoroush Dalili
 
Static Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouStatic Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouKevin Fealey
 
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...Frans Rosén
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim HegazyHackIT Ukraine
 
Pentesting Using Burp Suite
Pentesting Using Burp SuitePentesting Using Burp Suite
Pentesting Using Burp Suitejasonhaddix
 
WEBINAR: OWASP API Security Top 10
WEBINAR: OWASP API Security Top 10WEBINAR: OWASP API Security Top 10
WEBINAR: OWASP API Security Top 1042Crunch
 

What's hot (20)

API Testing. Streamline your testing process.
API Testing. Streamline your testing process.API Testing. Streamline your testing process.
API Testing. Streamline your testing process.
 
Security Exploit of Business Logic Flaws, Business Logic Attacks
Security Exploit of Business Logic Flaws, Business Logic AttacksSecurity Exploit of Business Logic Flaws, Business Logic Attacks
Security Exploit of Business Logic Flaws, Business Logic Attacks
 
Burp suite
Burp suiteBurp suite
Burp suite
 
Burp suite
Burp suiteBurp suite
Burp suite
 
Cross Site Request Forgery Vulnerabilities
Cross Site Request Forgery VulnerabilitiesCross Site Request Forgery Vulnerabilities
Cross Site Request Forgery Vulnerabilities
 
Hacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdfHacking and Defending APIs - Red and Blue make Purple.pdf
Hacking and Defending APIs - Red and Blue make Purple.pdf
 
Rest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API SecurityRest API Security - A quick understanding of Rest API Security
Rest API Security - A quick understanding of Rest API Security
 
Api security-testing
Api security-testingApi security-testing
Api security-testing
 
Introduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & DefenseIntroduction to CSRF Attacks & Defense
Introduction to CSRF Attacks & Defense
 
Spring Boot & Actuators
Spring Boot & ActuatorsSpring Boot & Actuators
Spring Boot & Actuators
 
Cross site scripting
Cross site scriptingCross site scripting
Cross site scripting
 
Cross Site Request Forgery
Cross Site Request ForgeryCross Site Request Forgery
Cross Site Request Forgery
 
Introducing Swagger
Introducing SwaggerIntroducing Swagger
Introducing Swagger
 
What is Swagger?
What is Swagger?What is Swagger?
What is Swagger?
 
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 EditionGoing Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
Going Beyond Microsoft IIS Short File Name Disclosure - NahamCon 2023 Edition
 
Static Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and YouStatic Analysis Security Testing for Dummies... and You
Static Analysis Security Testing for Dummies... and You
 
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
How to steal and modify data using Business Logic flaws - Insecure Direct Obj...
 
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
"15 Technique to Exploit File Upload Pages", Ebrahim Hegazy
 
Pentesting Using Burp Suite
Pentesting Using Burp SuitePentesting Using Burp Suite
Pentesting Using Burp Suite
 
WEBINAR: OWASP API Security Top 10
WEBINAR: OWASP API Security Top 10WEBINAR: OWASP API Security Top 10
WEBINAR: OWASP API Security Top 10
 

Viewers also liked

Burp plugin development for java n00bs (44 con)
Burp plugin development for java n00bs (44 con)Burp plugin development for java n00bs (44 con)
Burp plugin development for java n00bs (44 con)Marc Wickenden
 
AppSec USA 2015: Customizing Burp Suite
AppSec USA 2015: Customizing Burp SuiteAppSec USA 2015: Customizing Burp Suite
AppSec USA 2015: Customizing Burp SuiteAugust Detlefsen
 
Web Hacking With Burp Suite 101
Web Hacking With Burp Suite 101Web Hacking With Burp Suite 101
Web Hacking With Burp Suite 101Zack Meyers
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with pythonHoang Nguyen
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with pythonLuis Goldster
 
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp
 
How to Launch a Web Security Service in an Hour
How to Launch a Web Security Service in an HourHow to Launch a Web Security Service in an Hour
How to Launch a Web Security Service in an HourCyren, Inc
 
Pyscho-Strategies for Social Engineering
Pyscho-Strategies for Social EngineeringPyscho-Strategies for Social Engineering
Pyscho-Strategies for Social EngineeringIshan Girdhar
 
Burp suite
Burp suiteBurp suite
Burp suiteAmmar WK
 
Windows Azure Versioning Strategies
Windows Azure Versioning StrategiesWindows Azure Versioning Strategies
Windows Azure Versioning StrategiesPavel Revenkov
 
Wcf security session 1
Wcf security session 1Wcf security session 1
Wcf security session 1Anil Kumar M
 
Basics of WCF and its Security
Basics of WCF and its SecurityBasics of WCF and its Security
Basics of WCF and its SecurityMindfire Solutions
 
Pentesting With Web Services in 2012
Pentesting With Web Services in 2012Pentesting With Web Services in 2012
Pentesting With Web Services in 2012Ishan Girdhar
 
WCF Security, FSec
WCF Security, FSecWCF Security, FSec
WCF Security, FSecAnte Gulam
 
Pentesting RESTful webservices
Pentesting RESTful webservicesPentesting RESTful webservices
Pentesting RESTful webservicesMohammed A. Imran
 

Viewers also liked (20)

Burp plugin development for java n00bs (44 con)
Burp plugin development for java n00bs (44 con)Burp plugin development for java n00bs (44 con)
Burp plugin development for java n00bs (44 con)
 
AppSec USA 2015: Customizing Burp Suite
AppSec USA 2015: Customizing Burp SuiteAppSec USA 2015: Customizing Burp Suite
AppSec USA 2015: Customizing Burp Suite
 
Web Hacking With Burp Suite 101
Web Hacking With Burp Suite 101Web Hacking With Burp Suite 101
Web Hacking With Burp Suite 101
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with python
 
Extending burp with python
Extending burp with pythonExtending burp with python
Extending burp with python
 
Paypal-IPN
Paypal-IPNPaypal-IPN
Paypal-IPN
 
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challengeITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
ITCamp 2012 - Mihai Nadas - Tackling the single sign-on challenge
 
How to Launch a Web Security Service in an Hour
How to Launch a Web Security Service in an HourHow to Launch a Web Security Service in an Hour
How to Launch a Web Security Service in an Hour
 
Pyscho-Strategies for Social Engineering
Pyscho-Strategies for Social EngineeringPyscho-Strategies for Social Engineering
Pyscho-Strategies for Social Engineering
 
Burp suite
Burp suiteBurp suite
Burp suite
 
Windows Azure Versioning Strategies
Windows Azure Versioning StrategiesWindows Azure Versioning Strategies
Windows Azure Versioning Strategies
 
Wcf security session 1
Wcf security session 1Wcf security session 1
Wcf security session 1
 
Web Service Security
Web Service SecurityWeb Service Security
Web Service Security
 
Basics of WCF and its Security
Basics of WCF and its SecurityBasics of WCF and its Security
Basics of WCF and its Security
 
Pentesting With Web Services in 2012
Pentesting With Web Services in 2012Pentesting With Web Services in 2012
Pentesting With Web Services in 2012
 
Burpsuite yara
Burpsuite yaraBurpsuite yara
Burpsuite yara
 
WCF Security, FSec
WCF Security, FSecWCF Security, FSec
WCF Security, FSec
 
Pentesting RESTful webservices
Pentesting RESTful webservicesPentesting RESTful webservices
Pentesting RESTful webservices
 
Intro to IronWASP
Intro to IronWASPIntro to IronWASP
Intro to IronWASP
 
ZN-2015
ZN-2015ZN-2015
ZN-2015
 

Similar to Cusomizing Burp Suite - Getting the Most out of Burp Extensions

Static Code Analysis for Projects, Built on Unreal Engine
Static Code Analysis for Projects, Built on Unreal EngineStatic Code Analysis for Projects, Built on Unreal Engine
Static Code Analysis for Projects, Built on Unreal EngineAndrey Karpov
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB
 
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...SmartBear
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum
 
Hacker Proof web app using Functional tests
Hacker Proof web  app using Functional testsHacker Proof web  app using Functional tests
Hacker Proof web app using Functional testsAnkita Gupta
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsSriram Hariharan
 
Nginx conference 2015
Nginx conference 2015Nginx conference 2015
Nginx conference 2015ING-IT
 
Part of the DLM Story: Automated database build and test with TeamCity
Part of the DLM Story: Automated database build and test with TeamCityPart of the DLM Story: Automated database build and test with TeamCity
Part of the DLM Story: Automated database build and test with TeamCityRed Gate Software
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsAleksandar Bozinovski
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAmazon Web Services
 
Finding vulnerabilities with Burp Suite Custom Scan Profiles.pdf
Finding vulnerabilities with Burp Suite Custom Scan Profiles.pdfFinding vulnerabilities with Burp Suite Custom Scan Profiles.pdf
Finding vulnerabilities with Burp Suite Custom Scan Profiles.pdfNullHyderabad
 
Projects Walook
Projects WalookProjects Walook
Projects WalookWalook
 
What's new in Xamarin.iOS, by Miguel de Icaza
What's new in Xamarin.iOS, by Miguel de IcazaWhat's new in Xamarin.iOS, by Miguel de Icaza
What's new in Xamarin.iOS, by Miguel de IcazaXamarin
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsMahesh Arali
 
Testing microservices with docker
Testing microservices with dockerTesting microservices with docker
Testing microservices with dockerDenis Brusnin
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management SmartBear
 
SplunkLive! Developer Session
SplunkLive! Developer SessionSplunkLive! Developer Session
SplunkLive! Developer SessionSplunk
 

Similar to Cusomizing Burp Suite - Getting the Most out of Burp Extensions (20)

Static Code Analysis for Projects, Built on Unreal Engine
Static Code Analysis for Projects, Built on Unreal EngineStatic Code Analysis for Projects, Built on Unreal Engine
Static Code Analysis for Projects, Built on Unreal Engine
 
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
MongoDB World 2018: Ch-Ch-Ch-Ch-Changes: Taking Your Stitch Application to th...
 
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
The Magic Behind Faster API Development, Testing and Delivery with API Virtua...
 
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan KuštInfinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
Infinum Android Talks #13 - Developing Android Apps Like Navy Seals by Ivan Kušt
 
Apiary
ApiaryApiary
Apiary
 
Hacker Proof web app using Functional tests
Hacker Proof web  app using Functional testsHacker Proof web  app using Functional tests
Hacker Proof web app using Functional tests
 
Logic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIsLogic apps and PowerApps - Integrate across your APIs
Logic apps and PowerApps - Integrate across your APIs
 
Nginx conference 2015
Nginx conference 2015Nginx conference 2015
Nginx conference 2015
 
Jenkins Overview
Jenkins OverviewJenkins Overview
Jenkins Overview
 
Jenkins-CI
Jenkins-CIJenkins-CI
Jenkins-CI
 
Part of the DLM Story: Automated database build and test with TeamCity
Part of the DLM Story: Automated database build and test with TeamCityPart of the DLM Story: Automated database build and test with TeamCity
Part of the DLM Story: Automated database build and test with TeamCity
 
Building API in the cloud using Azure Functions
Building API in the cloud using Azure FunctionsBuilding API in the cloud using Azure Functions
Building API in the cloud using Azure Functions
 
Announcing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck TalksAnnouncing AWS CodeBuild - January 2017 Online Teck Talks
Announcing AWS CodeBuild - January 2017 Online Teck Talks
 
Finding vulnerabilities with Burp Suite Custom Scan Profiles.pdf
Finding vulnerabilities with Burp Suite Custom Scan Profiles.pdfFinding vulnerabilities with Burp Suite Custom Scan Profiles.pdf
Finding vulnerabilities with Burp Suite Custom Scan Profiles.pdf
 
Projects Walook
Projects WalookProjects Walook
Projects Walook
 
What's new in Xamarin.iOS, by Miguel de Icaza
What's new in Xamarin.iOS, by Miguel de IcazaWhat's new in Xamarin.iOS, by Miguel de Icaza
What's new in Xamarin.iOS, by Miguel de Icaza
 
Dev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teamsDev ops for mobile apps at microsoft teams
Dev ops for mobile apps at microsoft teams
 
Testing microservices with docker
Testing microservices with dockerTesting microservices with docker
Testing microservices with docker
 
Effective API Lifecycle Management
Effective API Lifecycle Management Effective API Lifecycle Management
Effective API Lifecycle Management
 
SplunkLive! Developer Session
SplunkLive! Developer SessionSplunkLive! Developer Session
SplunkLive! Developer Session
 

Recently uploaded

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 

Recently uploaded (20)

Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 

Cusomizing Burp Suite - Getting the Most out of Burp Extensions

  • 1. AppSec USA 2014 Denver, Colorado Customizing Burp Suite Getting the Most out of Burp Extensions
  • 2. 2 August Detlefsen Senior Application Security Consultant Author • augustd@codemagi.com • @codemagi • http://www.codemagi.com/blog
  • 3. 3 Burp Suite • Burp Suite is a powerful tool for performing security assessments • Burp Plugin API allows new features to be added www.portswigger.net/burp/extender
  • 4. 4 What Can I Do With Plugins? • Passive Scanning • Active Scanning • Alter/append requests • Define Insertion Points for Scanner/Intruder • Create new payload types • Automate Authentication • Much, Much More
  • 5. 5 Prerequisites • Burp Suite Pro v 1.5.x+ • Java 1.6.x+ • NetBeans • Other programming languages – Jython – JRuby
  • 6. 6 Creating An Extension • Download the Extender API from Portswigger: portswigger.net/burp/extender/api/ burp_extender_api.zip • Or export the API from within Burp
  • 7. 7 Creating an Extension • Create a new project with existing sources:
  • 8. 8 Creating an Extension • Create the BurpExtender class – In package ‘burp’ – Implement IBurpExtender
  • 9. 9 Creating an Extension
  • 10. 10 Creating an Extension • Implement registerExtenderCallbacks
  • 11. 11 Load the Extension into Burp Suite
  • 12. 12 Building a Passive Scanner Passive Scanning • Search responses for problematic values • Built-in passive scans – Credit card numbers – Known passwords – Missing headers
  • 13. 13 Building a Passive Scanner Passive Scanning – Room for Improvement • Error Messages • Software Version Numbers
  • 14. 14 Building a Passive Scanner Building a Passive Scanner • Implement the IScannerCheck interface: • Register the extension as a scanner:
  • 15. 15 Building a Passive Scanner IScannerCheck.doPassiveScan()
  • 16. 16 Building a Passive Scanner IScannerCheck.doPassiveScan()
  • 17. 17 Building a Passive Scanner IScannerCheck.consolidateDuplicateIssues() • Ensure an issue is only posted to scanner once
  • 18. 18 Building a Passive Scanner IScannerCheck.doActiveScan() • Only needed for active scans
  • 19. 19 Building an Active Scanner Active Scanning • Issue requests containing attacks • Look for indication of success in response • Built-In Active Scans – XSS – SQL Injection – Path Traversal – etc
  • 20. 20 Building an Active Scanner IScannerCheck.doActiveScan()
  • 21. 21 Building an Active Scanner Insertion Points • Locations of parameters in request • Contain data the server will act upon
  • 22. 22 Building an Active Scanner
  • 23. 23 Building an Active Scanner
  • 24. 24 Building an Active Scanner Defining Insertion Points • Implement IScannerInsertionPointProvider – getInsertionPoints() • Register as an insertion point provider
  • 25. 25 Building an Active Scanner BurpExtender.getInsertionPoints()
  • 26. 26 Building an Active Scanner
  • 27. 27 Building an Active Scanner Viewing Insertion Points • Add menu option to send request to Intruder • Implement IContextMenuFactory – createMenuItems() • Register as a menu factory
  • 28. 28 Building an Active Scanner BurpExtender.createMenuItems()
  • 29. 29 Building an Active Scanner MenuItemListener
  • 30. 30 Building an Active Scanner BurpExtender.sendGWTToIntruder()
  • 31. 31 Building an Active Scanner
  • 32. 32 Building an Active Scanner
  • 33. 33 Modifying Requests Modifying Requests • Add custom headers • Add signatures • CSRF tokens
  • 34. 34 Modifying Requests Modifying Requests • Implement IHttpListener – processHttpMessage() • Register as an HTTP Listener
  • 35. 35 Modifying a Request BurpExtender.processHttpMessage()
  • 36. 36 Modifying a Request BurpExtender.signRequest()
  • 37. 37 Utilities Debugging • callbacks.printOutput(String) • callbacks.printError(String)
  • 39. 39 Utilities Debugging – Stack Traces • Exception.printStackTrace() • Get the error OutputStream • Print a stack trace to the stream
  • 41. 41 Summary • Setup • Passive Scanning • Active Scanning • Handling custom request types • Utilities
  • 42. 42 Resources Extension Downloads • Download Extensions at: www.codemagi.com/downloads • Source code on Google Code
  • 43. 43 Build Extensions! Customize YOUR Hacking! Profit!

Editor's Notes

  1. I recently got done publishing a book, so I get to put ‘Author” on this slide. What does Senior Application Security Consultant mean? It means a large portion of my job is pen tests. And I’m always looking for ways to make them easier and more fun.
  2. Burp Suite Burp Suite is the leading web application vulnerability testing tool. It is available from http://portswigger.net for $299/year –a fraction of the cost of some other commercially available web application testing tools. Burp supports a plugin architecture which allows additional functionality to be developed and integrated with the tool. Anyone can download it and start adding new features to the tool.
  3. I’ve spoken to some of you who are using plugins to do some truly incredible stuff like turning Burp into a full automated testing suite. In the short time we have here today we won’t be able to get into cool stuff like that, but I want to give you the basic tools to get started writing your own extensions.
  4. Development Requirements You need Burp Suite Pro in order to use extensions. If you have a Pro license, you automatically have access to the latest Burp versions, so no problem there. Java 1.6.x is the minimum requirement to run Burp, but much newer versions are available. I like NetBeans for its ease of use, but you can use any IDE, or even a simple text editor You can also write Burp extensions in Python using Jython, OR Ruby using Jruby, but Java is the native language of Burp Suite (and me) so that will be the focus of this talk today.
  5. You must download the Burp Extender API from Portswigger in order to create an extension. The Extender API contains interfaces you will implement to develop different kinds of plugin functionality. You can also export the API from within Burp Suite itself by going to Extender -> APIs and clicking Save interface files.
  6. This shows NetBeans but you can use your own IDE, or even a text editor. The key part is to create your project using the existing API files that you downloaded.
  7. The BurpExtender class is the guts of any extension. It must be named BurpExtender and be in the burp package. Implementing IBurpExtender tells Burp Suite that this is an extension that can be loaded and provide additional functionality to the program.
  8. You will now have a project structure like this. For some reason Burp Suite requires each extension to have their own copy of all of the Extender interfaces, even though they are included in the Burp Suite jar itself.
  9. The registerExtenderCallbacks method is called when Burp loads the extension. This is where you can perform any initialization tasks your extension needs. It is passed an instance of IBurpExtenderCallbacks. This class allows your plugin to get access to internal Burp methods and this is the only time you will be able to get the callbacks object, so it is important to store it in the extension now. IBurpExtenderHelpers is another useful class that allows you to do things like issuing and parsing HTTP requests, encoding/decoding, etc. You will probably use it a lot, so just store a reference to it in your extension. Finally, we can set the name for the extension. This is what will be displayed in Burp’s list of loaded extensions.
  10. To load the extension: Go to Burp’s Extender tab and click Add Select the compiled jar file, then click Next You should see an output screen saying “the extension loaded successfully” Finally, you will see the new extension in the list of extensions
  11. Passive Scanning Passive scanning allows you to monitor responses for certain values and flag them as issues in the Burp Scanner tab. Burp includes built in passive scanning for things like credit card numbers, previously used passwords, missing headers like X-Frame-Options, etc.
  12. Error messages can reveal valuable details about the inner workings of an application Software version numbers can inform you as to the overall health of an organization’s operations: When they are patched, how up to date, etc. These things are often only revealed in error pages - things that might be responses to Scanner or Intruder requests, but not necessarily seen by a tester. Burp has no facility to detect them on its own. Enter the Plugins!
  13. To build a passive scanner you must implement the IScannerCheck interface and register it as a scanner check with the Extender Callbacks. IScannerCheck requires you to implement 3 methods. Registering the extension as a scanner check is a simple method call to the callbacks object and can be done when the extension initializes.
  14. Passive scanners must implement the doPassiveScan method. This is where the meat of your extension’s work will be done. In this case we get the body of the response, then iterate over a list of regular expressions (contained in the MatchRule objects) attempting to match them to the body. When we find a match, we save it in a ScannerMatch object (just a simple Java bean defined as an inner class) which we will add to Burp’s Scanner results.
  15. Once we have found matches of our regex, we want to add them to the Burp Scanner interface. 1. First, we need to sort the matches. This is important because in order for code highlighting to work, Burp wants all matches to be in order. 2. Next create the description that will appear in the Scanner Advisory panel. 3. Iterate through the scanner matches and turn them into a List of stop and start positions for the code highlighting 4. Finally return a CustomScanIssue (an POJO object that extends IScanIssue) to be added to the Scanner If no issues are found, simply return null
  16. consolidateDuplicateIssues is called by Burp to ensure that the same issue only shows up once on Burp’s Scanner list. It essentially works like any other Java Comparable: Return -1 to keep the old issue and discard the new one Return 0 to report both issues Return 1 to report the new issue and discard the old one
  17. doActiveScan is part of the IScannerCheck interface, but it is only used when doing an active scan. Nevertheless, we still have to implement it in order to build a valid class. In the case of our passive scan, we can simply return null.
  18. This brings us to our next topic, Active Scanning. Active scanning is excellent for finding injection type vulnerabilities, like SQLi, XSS and others. Active scanning is more complicated because it requires you to issue requests and look for success in the responses. Here we will be building an example active scanner to test for server-side injection on a JavaScript-based website, for example using node.js.
  19. When building an active scan, we do the opposite of what we did with a passive scanner: Implement doActiveScan and have doPassiveScan return null. doActiveScan is called for each insertion point of each request that the Burp Scanner makes. Here we iterate through our injection tests, and for each: Compile a test request Issue the request Look for matches in the response, and if any are found, report an issue In all other respects, doActiveScan and doPassiveScan both perform the same way.
  20. Insertion Points define the locations within a request that contain data that the server will act upon. Insertion points are used by the Active Scanner or Burp Intruder to target attack payloads.
  21. You can see the insertion points that Burp identifies by right-clicking a request and selecting Send to Intruder. Burp does a pretty good job defining insertion points on its own for regular HTTP requests.
  22. But what if your request looks like this? This is a Google Web Toolkit request, and Burp’s built-in request parser doesn’t do such a good job. Somewhere inside that huge block of condensed text, we know that there is data that the server is going to act upon. Sure, in Intruder we can actively select each one, but that is time consuming and… boring. So how can we teach Burp to automatically know where they are?
  23. To have your extension define insertion points, you must implement IScannerInsertionPointProvider. This consists of one method: getInsertionPoints() You also need to register as an insertion point provider. This can be done in the registerExtenderCallbacks method when your extension initializes.
  24. Implementing getInsertionPoints is easy. The method is passed the HTTP request. We parse that request to determine the offsets of the insertion points we want to use. In this case, I did some research and found existing parsers, but they all missed something, so I wound up writing my own. How it works is unimportant, just know that it returns a set of offsets: The start/stop index of the insertion point within the raw request. Once we know the offsets, we create a List of IScannerInsertionPoint objects using the helpers object we got form the callbacks.
  25. getInsertionPoints() is called automatically when you send an item to the active scanner. If you send a request to the scanner, you can see that it now has 5 insertion points, rather than the 2 that Burp originally identified.
  26. If you want to see the actual insertion points that your extension defines you have to send the request to Intruder. Burp’s own Send to Intruder option will use the built-in insertion points, so you need to add your own option to the right-click menu. To do that you will need to implement the IContextMenuFactory interface and add the createMenuItems() method. You also need to register as a context menu factory. This can be done in the registerExtenderCallbacks method when your extension initializes.
  27. The createMenuItems method is passed an Invocation object by Burp. This object contains the request or requests that were selected when the mouse was right clicked. We want to create a new standard Swing JMenuItem and attach an ActionListener that will fire when the menu item is clicked. This method actually wants you to return a Collection of menu items. That way your extension can define more than one menu item.
  28. The MenuItemListener is an inner class that implements ActionListener just like any other Swing component. It has an actionPerformed method that takes an array of request-response objects and passes them to a method that parses them and sends them to Intruder.
  29. The method called by the MenuItemListener parses each request in turn to see if it can locate GWT insertion points. If insertion points are found, that indicates that the request is a GWT request. Then it invokes the sendToIntruder method of the callbacks, passing the request with the new insertion points to Intruder.
  30. Now you can right-click on a request in any of Burp’s Tools and there will be a new option in the context menu to send a GWT request to Intruder.
  31. In Intruder you can now see the 5 new insertion points that our extension defined.
  32. Some web services require you to send a custom header or signature with your requests. Or maybe you need to add a constantly rotating anti-CSRF token to each request. In that case you will need to do request modification.
  33. To setup your extension to modify requests you need to implement IHttpListener. This has one method: processHttpMessage() You also need to register the class as HTTP listener. Again, this is done in registerExtenderCallbacks
  34. The processHttpMessage method is called by Burp for each HTTP request before it is sent to the server, and for each response, before it is returned to the browser. The fist thing we need to do then is determine if this is a request or response. Fortunately Burp passes a boolean to this method to tell you. Next we need to determine whether this is a request for a URL we actually want to sign. This makes use of a handy method in the Burp callbacks called isInScope() Finally we check if the request is coming from a tool that we want to do signing for. For example, if you have a request in the repeater, you might not want to automatically sign it if you are trying to tamper with the signature itself. This is done by checking whether the toolFlag passed in to the method matches the tool values defined in the API. If all of those things are true, you actually proceed to signing the request.
  35. To sign the request you must first retrieve the request form the request-response object passed by Burp. The Burp Extender API provides some excellent tools for parsing and modifying HTTP messages. You can easily add, modify and delete parameters, but unfortunately it does not provide the same facility for headers. It also cannot guarantee that parameters and headers will follow a certain order. So I had to create my own request parser, the HttpMessage class. The signature class does the actual signing of the request. It sorts and canonicalizes the parameters and headers, and computes an HMAC of the request using your AWS secret key. I’m not going to get into that here, you can check the AWS docs if you want to know how that works. The important part is that the signature returns the raw bytes of the signed request. These are then set back into the request-response object so that Burp can send the modified request to the server.
  36. The Burp Extender API now offers methods to print Strings to the Extension’s output and error logs. This was actually a suggestion I submitted on the Burp Suite Forums. If you want to see stack traces you can use e.printStackTrace() and the stack trace will show up in the terminal where you launched Burp.
  37. Calling printOutput causes the message to be written to the Output tab on the Extensions panel, directly within the Burp GUI You can still also select to output to the terminal where you launched Burp, or save it to a file, which could be useful if you want to do further analysis.
  38. You can call printStackTrace and write a stack trace to the terminal where you opened Burp. To show a stack trace in Burp’s own interface, you need to get the actual OutputStream from the callbacks. Then, create a method to print an exception stack trace directly to that OutputStream.
  39. Now stack traces will show up directly within the Burp GUI
  40. We’ve talked about getting setup to develop, We’ve built extensions for passive scanning, active scanning, and handling custom requests. If it looked easy, that’s because it is easy! So get out there and customize Burp for your hacking needs!
  41. All of the extensions we talked about today are on my website. The source code is available on Google Code. Feel free to download and use them. I would love to hear your feedback! There is a link right on my site to contact me if you want to get involved, or if you have any questions about your extensions.
  42. So build extensions, customize Burp, PROFIT!