Skip to content
This repository was archived by the owner on Apr 27, 2026. It is now read-only.

Commit d85fef2

Browse files
committed
feat(script): add run scripts for exploit demonstration
1 parent 5ccecb8 commit d85fef2

3 files changed

Lines changed: 18 additions & 1 deletion

File tree

simulation/attack-script/exploit_cve_2017_5638.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,4 +197,4 @@ try {
197197
}
198198

199199
Write-Host ""
200-
Read-Host "Enter to exist"
200+

simulation/attack-script/run.ps1

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
s = Read-Host "Enter 0 to run the exploit in safe demo mode, or 1 for full RCE" -AsSecureString | ConvertFrom-SecureString | ForEach-Object {
2+
switch ($_ -replace '"', '') {
3+
'0' { "Running in safe demo mode...`n" }
4+
'1' { "Running with full RCE...`n" }
5+
default { throw "Invalid choice. Please enter 0 or 1." }
6+
}
7+
}
8+
if ($s -eq '0') {
9+
# Safe demo (proves OGNL eval, no OS commands):
10+
.\exploit_cve_2017_5638.ps1 -DemoMode
11+
} elseif ($s -eq '1') {
12+
# Full RCE:
13+
.\exploit_cve_2017_5638.ps1 -Command "whoami"
14+
}
15+
Read-Host "Press Enter to exit..."

simulation/backend/run.ps1

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
mvn tomcat7:run
2+
Read-Host "Enter to exit"

0 commit comments

Comments
 (0)