Making Blind XXE Quicker and Easier By Creating a Script to Exfiltrate Files

IppSec · Beginner ·💻 AI-Assisted Coding ·2y ago
00:00 - Introduction, why I created this script and a quick demo 01:00 - Going over XML Entity Injection, doing it manually and explaining what the payloads are 05:30 - Sponsor shoutout, showing Snyk scan the source code to this application and catching the XXE 06:30 - Patching the code, asking Github Copilot for a proper way to fix it and it recommends disabling loading XML Entity off remote sources 09:55 - Making sure Snyk is happy with our code fix and going over some other findings 11:04 - Start of coding the XXE Script, creating the webserver 16:40 - Putting our webserver in a thread so we can also run a CLI 18:30 - Talking about how and why we are just going to use a global variable with our thread 19:20 - Having our terminal able to update the payload variable, so we can easily change files we want to exfil 22:30 - Creating a function to read an HTTP Request copied from Burp, so we can use it with python requests 29:28 - Testing out our function, and discovering we need to fix the path 33:20 - The skeleton of the script is done, adding in the logic to actually perform the XXE Attack but putting the file name in the wrong spot. 38:15 - Running our script and fixing up a few bugs 40:44 - Fixing up where we placed the file in our XXE Payload 42:15 - Adding comments in our code as we glance over it 43:30 - Adding some login in our script to tell the python server it is base64, which should help future proof it for doing XXE with other languages 47:30 - Adding argparse to our program, so we can get rid of hard coded variables 50:50 - Parsing the LHOST variable from the request file we have, so the server will send the file to the right location
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from IppSec · IppSec · 0 of 60

← Previous Next →
1 HHC2016 - Analytics
HHC2016 - Analytics
IppSec
2 HackTheBox - October
HackTheBox - October
IppSec
3 HackTheBox - Arctic
HackTheBox - Arctic
IppSec
4 HackTheBox - Brainfuck
HackTheBox - Brainfuck
IppSec
5 HackTheBox - Bank
HackTheBox - Bank
IppSec
6 HackTheBox - Joker
HackTheBox - Joker
IppSec
7 HackTheBox - Lazy
HackTheBox - Lazy
IppSec
8 Camp CTF 2015 - Bitterman
Camp CTF 2015 - Bitterman
IppSec
9 HackTheBox - Devel
HackTheBox - Devel
IppSec
10 Reversing Malicious Office Document (Macro) Emotet(?)
Reversing Malicious Office Document (Macro) Emotet(?)
IppSec
11 HackTheBox - Granny and Grandpa
HackTheBox - Granny and Grandpa
IppSec
12 HackTheBox - Pivoting Update: Granny and Grandpa
HackTheBox - Pivoting Update: Granny and Grandpa
IppSec
13 HackTheBox - Optimum
HackTheBox - Optimum
IppSec
14 HackTheBox - Charon
HackTheBox - Charon
IppSec
15 HackTheBox - Sneaky
HackTheBox - Sneaky
IppSec
16 HackTheBox - Holiday
HackTheBox - Holiday
IppSec
17 HackTheBox - Europa
HackTheBox - Europa
IppSec
18 Introduction to tmux
Introduction to tmux
IppSec
19 HackTheBox - Blocky
HackTheBox - Blocky
IppSec
20 HackTheBox - Nineveh
HackTheBox - Nineveh
IppSec
21 HackTheBox - Jail
HackTheBox - Jail
IppSec
22 HackTheBox - Blue
HackTheBox - Blue
IppSec
23 HackTheBox - Calamity
HackTheBox - Calamity
IppSec
24 HackTheBox - Shrek
HackTheBox - Shrek
IppSec
25 HackTheBox - Mirai
HackTheBox - Mirai
IppSec
26 HackTheBox - Shocker
HackTheBox - Shocker
IppSec
27 HackTheBox - Mantis
HackTheBox - Mantis
IppSec
28 HackTheBox - Node
HackTheBox - Node
IppSec
29 HackTheBox - Kotarak
HackTheBox - Kotarak
IppSec
30 HackTheBox - Enterprise
HackTheBox - Enterprise
IppSec
31 HackTheBox - Sense
HackTheBox - Sense
IppSec
32 HackTheBox - Minion
HackTheBox - Minion
IppSec
33 VulnHub - Sokar
VulnHub - Sokar
IppSec
34 VulnHub - Pinkys Palace v2
VulnHub - Pinkys Palace v2
IppSec
35 HackTheBox - Inception
HackTheBox - Inception
IppSec
36 Vulnhub - Trollcave 1.2
Vulnhub - Trollcave 1.2
IppSec
37 HackTheBox - Ariekei
HackTheBox - Ariekei
IppSec
38 HackTheBox - Flux Capacitor
HackTheBox - Flux Capacitor
IppSec
39 HackTheBox - Jeeves
HackTheBox - Jeeves
IppSec
40 HackTheBox - Tally
HackTheBox - Tally
IppSec
41 HackTheBox - CrimeStoppers
HackTheBox - CrimeStoppers
IppSec
42 HackTheBox - Fulcrum
HackTheBox - Fulcrum
IppSec
43 HackTheBox - Chatterbox
HackTheBox - Chatterbox
IppSec
44 HackTheBox - Falafel
HackTheBox - Falafel
IppSec
45 How To Create Empire Modules
How To Create Empire Modules
IppSec
46 HackTheBox - Nightmare
HackTheBox - Nightmare
IppSec
47 HackTheBox - Nightmarev2  - Speed Run/Unintended Solutions
HackTheBox - Nightmarev2 - Speed Run/Unintended Solutions
IppSec
48 HackTheBox - Bart
HackTheBox - Bart
IppSec
49 HackTheBox -  Aragog
HackTheBox - Aragog
IppSec
50 HackTheBox - Valentine
HackTheBox - Valentine
IppSec
51 HackTheBox - Silo
HackTheBox - Silo
IppSec
52 HackTheBox - Rabbit
HackTheBox - Rabbit
IppSec
53 HackTheBox - Celestial
HackTheBox - Celestial
IppSec
54 HackTheBox - Stratosphere
HackTheBox - Stratosphere
IppSec
55 HackTheBox - Poison
HackTheBox - Poison
IppSec
56 HackTheBox - Canape
HackTheBox - Canape
IppSec
57 HackTheBox - Olympus
HackTheBox - Olympus
IppSec
58 HackTheBox - Sunday
HackTheBox - Sunday
IppSec
59 HackTheBox - Fighter
HackTheBox - Fighter
IppSec
60 HackTheBox - Bounty
HackTheBox - Bounty
IppSec

Related AI Lessons

Chapters (18)

Introduction, why I created this script and a quick demo
1:00 Going over XML Entity Injection, doing it manually and explaining what the pay
5:30 Sponsor shoutout, showing Snyk scan the source code to this application and ca
6:30 Patching the code, asking Github Copilot for a proper way to fix it and it rec
9:55 Making sure Snyk is happy with our code fix and going over some other findings
11:04 Start of coding the XXE Script, creating the webserver
16:40 Putting our webserver in a thread so we can also run a CLI
18:30 Talking about how and why we are just going to use a global variable with our
19:20 Having our terminal able to update the payload variable, so we can easily chan
22:30 Creating a function to read an HTTP Request copied from Burp, so we can use it
29:28 Testing out our function, and discovering we need to fix the path
33:20 The skeleton of the script is done, adding in the logic to actually perform th
38:15 Running our script and fixing up a few bugs
40:44 Fixing up where we placed the file in our XXE Payload
42:15 Adding comments in our code as we glance over it
43:30 Adding some login in our script to tell the python server it is base64, which
47:30 Adding argparse to our program, so we can get rid of hard coded variables
50:50 Parsing the LHOST variable from the request file we have, so the server will s
Up next
This AI monitors itself and opens its own PRs
LangChain
Watch →