❎
wiki.hackerlab.cz
  • About me
  • Vulnerability Assessment
  • CLOUD PENTESTING
    • AWS
    • GCP
    • Microsoft Azure
    • Labs
  • REST API - Bypasses and Privilege Escalations
  • Python Virtual Environment (VENV)
  • OSINT & Information Gathering
  • Web Pentesting
    • JavaScript .maps
    • SSRF
    • LDAP Injection
    • Django ORM Exploitation
    • HTTP Request Smuggling
    • Server Side Template Injection (SSTI)
    • Insecure Deserialization
    • Brute force
    • Shell Fu - Oneliners
    • CORS
    • Special Chars & NULL Bytes
    • XSS
    • XXE
    • Nuclei
    • SQL Injection
    • Blind SQL Injection
    • SQLmap
    • NoSQL Injection
    • CRLF Injection
    • Input Validation - Fuzz1
    • HTTP Headers - X-Forwarded
    • Log4j
    • Enumeration with Wordlists
    • Bug Bounty - Web Recon
    • HTTP Proxy Override
    • CSV Injection
    • Windows Forbidden File Names
    • Path Traversal
    • OS Command Injection
    • Open Redirect
    • JWT Tool
    • Burp Extensions - TokenJAR & ATOR
    • Upload RCE
    • GUID and UUIDs
  • Toolset
    • Git - Repo and Tools
    • Docker for Pentesters
  • Infrastructure Pentesting
    • Active Directory (AD)
      • Vulnerable Machines (labs)
      • Pass the hash
      • Azure Active Directory
      • Password Cracking
      • Domain Enumeration
      • LLMNR Poisoning with Responder
      • HTB Forest
      • LDAP
      • WinRM
      • SMB & RPC Enumeration
      • SMB Relay
      • Impacket
      • Bloodhound
      • OWA Exchange Server 2019
      • Active Directory Web Services (ADWS)
      • Active Directory Attacks
    • Mail Server Attacks
    • NFS Enumeration
    • Windows PostExploitation
      • Windows Enumeration
      • Powershell Payloads
      • Add RDP Account & Ride on Meterpreter
    • Dump File Analysis
  • Other Pentest Projects
    • Security Projects
  • WIFI Pentesting
    • Kali Linux - Alpha card AWUS 1900 (VirtualBox)
    • Active Card & Monitor Mode
    • Aircrack-ng Suite
  • Certs
    • Burp Suite Certified Practitioner
  • Linux
    • Network Manager
  • Books
    • The Hacker Playbook 3
Powered by GitBook
On this page
  • TokenJar
  • ATOR

Was this helpful?

  1. Web Pentesting

Burp Extensions - TokenJAR & ATOR

Burp extensions that help you deal with JWT access tokens.

PreviousJWT ToolNextUpload RCE

Last updated 2 months ago

Was this helpful?

Keep in mind to configure scanner and intruder attack in single thread (resource pool), access token renewal is sequential and it can not run in parallel. You can achieve access token renewal using native Session Rules and Macros in Burp but it might be challenging to set it right. I personally prefer ATOR for its quick setup. TokenJAR is sometimes desynchronised and it leans on active web user session (front-end activity).

TokenJar

This Burp extension does not support scanner so you can use it basically with Repeater and Intruder, (Proxy is not recommended). The benefit of TokenJar is that it silently listens requests coming from your web browser and stores/replace new tokens. Therefore you need to keep your web session active. In case you are testing REST API without WebUI (frontend) choose ATOR instead!

Just import the following configuration from a text file. Adjust URI path in imported regex rule, for example, /v1/session to instruct TokenJAR when to retrieve a new token.

TokenJar 2.2 [[true,"Authorization",true,false,false,false,false,"","\"Bearer \" + grp[1] + grp[2]","Authorization: Bearer ([a-zA-Z0-9_.-]+)?|\"token\":\"([a-zA-Z0-9_.-]+)?\"","/v1/session"]]

If you need to debug your configuration, turn on []debug checkbox and navigate to Burp Extension tab monitoring Output/Error consoles.

ATOR

ATOR stands for and this extension will help you with token handling in Repeater, Intruder, Scanner, Extension for your fully weaponisation. It might remind you ExtendedMacro Burp extension, you are right the roots are there!

How to create your first configuration:

  • ATOR triggers on error condition that you define, it's usually unauthorised HTTP response (40x). First send a HTTP request with expired or invalid JWT token (from Proxy history) to ATOR using Extensions -> ATOR -> Error condition

Now move to ATOR 1.Error condition tab

  • click on ADD condition button

Go back to Proxy history and find a login request that retrieves a valid JWT access token. Use context menu and send the request to ATOR using Extensions -> ATOR -> Obtain Token menu item.

Now switch to ATOR Obtain Token tab and select by mouse the valid access token from the HTTP response on the right.

  • click on From selection button

  • fill the Name: for variable name that refers to a valid new access_token we obtained that is going to be use in replacement step.

  • Finally click on Add button

Now move to ATOR 3.Error Condition Replacement tab.

Mark the access token from the HTTP request (on the left) by mouse and move to the right panel clicking on the FROM selection button.

  • Next fill the Name: field to name the variable that refers to Authorization Bearer value from the request we have selected by mouse. You can label it as you want, we are not going to use this placeholder.

  • Now, the most important part, assign replacement variable that replace the current invalid token with valid one. Click on Extraction name: drop down menu choosing access_token named variable we defined in the previous 2.Obtain token step.

  • Finally click on Add button to store new new configuration that should look like this.

Now you can move to ATOR 4. Preview tab, click on Test and verify Configuration tab as well.

I recommend to export your ATOR configuration in case you restart Burp and ATOR is gone.

TokenJAR was primarily used for CSRF token testing.
Authentication Token Obtain and Replace