syselement's Blog
TwitterGitHubBuy Me a BookContact
  • ℹ️Home
  • 🔳Operating Systems
    • 🐧Linux
      • 📃Everything Linux
      • Linux Distros
        • Kali Linux - VM
        • ParrotOS - VM
        • Rocky Linux
        • Ubuntu Desktop - VM
        • Ubuntu Server - VM
      • Linux Tools
        • BookStack
        • Nessus Essentials
        • SysReptor
        • Terminator
        • UniFi
        • Zsh & Oh-My-Zsh
    • 🪟Windows
      • 📃Everything Windows
      • Windows Tools
        • Hashcat
        • Vagrant
      • Windows Virtual Machines
        • Windows 11 - VM
        • Windows Server 2025 - VM
  • 📝Courses Notes
    • eLearnSecurity / INE
      • eJPT - PTSv2
      • eMAPT
      • ICCA
    • Practical Networking
      • Practical TLS
        • TLS/SSL Overview
        • Cryptography
        • x509 Certificates and Keys
        • Security through Certificates
        • Cipher Suites
        • TLS/SSL Handshake
        • TLS Defenses
        • TLS Attacks & Vulnerabilities
        • What's new in TLS 1.3?
        • TLS 1.3 Under the Hood
        • TLS 1.3 Extensions
        • 🌐Practical TLS References
    • TCM Security
      • Linux101
      • MAPT
      • PEH
  • 🖥️Cyber Everything
    • 📌Generic Resources
      • Cryptography
      • CVSS 3.1
      • Cyber Threat Intelligence (CTI)
    • 📱Mobile
      • Apps Lab
        • Android Rooting Guide
        • iOS Jailbreak Guide
        • Intercepting Android App Traffic
      • OWASP MAS
        • MASTG Techniques
        • MASTG Tests
        • MASTG Theory
        • MASVS Notes
      • Tools
        • MobSF
    • 🧬Network
    • 🌐Web
      • API
        • API Sec Fundamentals
        • API Penetration Testing
      • PortSwigger Academy
        • Server-Side Topics
        • Client-Side Topics
        • Advanced topics
        • 🔬Vulnerability Labs
    • ✍️Writeups & Walkthroughs
      • 🌩️TryHackMe
        • 📖Learn
          • Cyber Threat Intelligence
          • Intro to Defensive Security
          • Juice Shop
          • Upload Vulnerabilities
        • 🎯Practice
          • Easy
            • Blaster
            • Blue
            • Bolt
            • Chill Hack
            • Ice
            • Ignite
            • Retro
            • Startup
          • Medium
            • Blog
      • 📦HackTheBox
      • 🚩Capture The Flag
  • ♾️DevOps Everything
    • 🔗DevOps Resources
      • Introduction to DevOps
      • Ansible
      • Docker
      • Git
      • Kubernetes
      • Terraform
      • Vim
  • 🔬Home Lab
    • 🖥️Hypervisors
      • Hyper-V
        • Windows WSL
      • Proxmox
        • Proxmox VE
        • Proxmox Upgrade 7 to 8
      • VMware
        • VMware Workstation Pro
    • 🔴Offensive Labs
      • Hashcat Password Cracking
      • Metasploitable3
    • 🔵Defensive Labs
      • Detection Lab
    • ⚪Misc Labs
      • Bitwarden On-Premise
      • OpenWrt & WiFi Exploitation
      • Passbolt CE - Ubuntu Server
Powered by GitBook
On this page
  • 🌐 Resources 🔗
  • Enumeration
  • SQL Injection - Login
  • Broken Authentication - Brute force
  • Sensitive Data Exposure
  • Poison Null Byte
  • Broken Access Control
  • Cross-Site Scripting (XSS)
  • DOM XSS (Special)
  • Persistent (Server-side)
  • Reflected (Client-side)
  • Metrics challenge

Was this helpful?

Edit on GitHub
  1. Cyber Everything
  2. Writeups & Walkthroughs
  3. TryHackMe
  4. Learn

Juice Shop

PreviousIntro to Defensive SecurityNextUpload Vulnerabilities

Last updated 5 months ago

Was this helpful?

🌐 Resources 🔗


Enumeration

accountant@juice-sh.op
admin@juice-sh.op
bender@juice-sh.op
jim@juice-sh.op
morty@juice-sh.op
mc.safesearch@juice-sh.op
stan@juice-sh.op
uvogin@juice-sh.op

# Registered users
admin@juice-sh.op
jim@juice-sh.op
bender@juice-sh.op
bjoern.kimminich@gmail.com
ciso@juice-sh.op
support@juice-sh.op
morty@juice-sh.op
mc.safesearch@juice-sh.op
J12934@juice-sh.op
wurstbrot@juice-sh.op
amy@juice-sh.op
bjoern@juice-sh.op
bjoern@owasp.org
accountant@juice-sh.op
uvogin@juice-sh.op
demo
0 st4rs f0r 7h3 h0rr1bl3 s3cur17y
K33p5 y0ur ju1cy 5plu773r 70 y0ur53lf!
y0ur f1r3wall needs m0r3 musc13

  • Admin - request:

{"email":"' or 1=1--","password":"aa"}

  • bender@juice-sh.op - request:

{"email":"bender@juice-sh.op'--","password":"a"}


  • Login request to Intruder (Burp Suite) - brute force password with /usr/share/wordlists/SecLists/Passwords/Common-Credentials/best1050.txt

{"email":"admin@juice-sh.op","password":"admin123"}

  • FTP public at /ftp

  • Find mc.safesearch@juice-sh.op password

    • listen - https://www.youtube.com/watch?v=v59CX2DiX0Y

mc.safesearch@juice-sh.op
Mr. N00dles

Poison Null Byte

URL Encoding and Null Bytes:

  • In URLs, the null byte (\x00) is encoded as %00.

  • Some web servers and applications improperly decode %00, interpreting it as a null byte, which can terminate strings prematurely.

Mismatch in Validation vs. Execution:

  • During validation, the application might check the entire string.

  • During execution, if the backend uses C-style string handling, the string stops at the null byte.

  • This mismatch can cause security checks to be bypassed.

%00
%2500

http://10.10.212.2/ftp/package.json.bak%2500.md

The %2500 encoding is an extra layer of obfuscation:

  • %25 is the literal encoding of %, so %2500 decodes to %00.

  • This may be necessary when certain servers or filters block %00 directly, but fail to handle double-encoded payloads like %2500.


Go to http://10.10.212.2/main-es2015.js

  • F12 Dev Tools - Sources - main-es2015.js

    • Search for path: "administration"

    • go to http://10.10.212.2/#/administration

To view another user's shopping basket Go to http://10.10.212.2/#/basket

  • change to GET /rest/basket/2

Go to http://machine_ip/#/administration

  • Remove 5 stars reviews


DOM XSS (Special)

  • Document Object Model-based Cross-site Scripting

Input the following in the search bar

  • XFS (Cross-Frame Scripting)

# e.g. 1
<iframe src="javascript:alert(`xss`)">

# e.g. 2
 <iframe width="100%" height="166" scrolling="no" frameborder="no" allow="autoplay" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/771984076&color=%23ff5500&auto_play=true&hide_related=false&show_comments=true&show_user=true&show_reposts=false&show_teaser=true"></iframe>

Persistent (Server-side)

With admin, go to http://10.10.212.2/#/privacy-security/last-login-ip

  • turn Burp interceptor on, and logout

  • for the GET /rest/saveLoginIp request, got to Headers tab and add a new header

Name:
True-Client-IP
Value:
<iframe src="javascript:alert(`xss`)">
  • Forward the request

  • Upon signing back into the admin account and revisiting the "Last Login IP" page, the XSS alert will trigger!

  • The True-Client-IP header functions similarly to the X-Forwarded-For header, as both inform the server or proxy about the client's IP address. However, due to the lack of proper sanitization in the header, we can exploit it to execute an XSS attack

Reflected (Client-side)

With admin, go to http://10.10.212.2/#/order-history

  • click truck icon - http://10.10.212.2/#/track-result?id=5267-8f615dcb73f36818

  • Use the following iframe XSS in the place of the 5267-8f615dcb73f36818

<iframe src="javascript:alert(`xss`)">
  • Submit the URL, refresh the page, and an alert displaying "XSS" will appear!

  • The server uses a lookup table or database (depending on its configuration) to manage each tracking ID. Since the id parameter is not sanitized before being processed by the server, this allows us to execute an XSS attack


Solve other chalenges by checking http://10.10.212.2/#/score-board


Metrics challenge

http://10.10.212.2/metrics


- Login

- Brute force

🖥️
✍️
🌩️
📖
SQL Injection
Broken Authentication
Sensitive Data Exposure
Broken Access Control
Cross-Site Scripting (XSS)
TryHackMe | OWASP Juice Shop
OWASP Top 10:2021
OWASP Top Ten 2017
tryhackme.com - © TryHackMe