Skip to content
This repository has been archived by the owner on Oct 3, 2023. It is now read-only.

Server and Logging #1

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
.DS_Store
node_modules/
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@ You need to have a WebSocket Server running at Port 5000 or you get "Initializat
If you want to rebuild stage2, cd into stage2 then run python make.py.
For building you need to have gobjcopy installed. (brew install binutils)

# Hosting
To host this exploit locally, follow these steps:
1. Run `node server.js` start the server.
2. Open `<host-ip>:1997/` on a vulnerable device.
The Host's terminal will show you a log of whats happening.

# The Bug
This is an optimization error in the way RegEx matching is handled. By setting lastIndex on a RegEx object to a JavaScript object which has the function toString defined, you can run code although the JIT thinks that RegEx matching is side effect free.
Exploitation is pretty similar to @5aelo's exploit for CVE-2018-4233, which can be found [here](https://github.com/saelo/cve-2018-4233).
Expand Down
2 changes: 2 additions & 0 deletions done.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
// for the host console to refresh and recognize that the procedure is done.
console.log("[STATUS] All set! Closing client connection...");
Loading