add exploit payloads

This commit is contained in:
Thomas Hobson 2021-04-28 15:35:40 +12:00
parent 6b138f2377
commit 73391cf718
No known key found for this signature in database
GPG Key ID: 9F1FD9D87950DB6F
5 changed files with 37 additions and 0 deletions

12
tests/fallocate.py Normal file
View File

@ -0,0 +1,12 @@
"""
Description
Writing a large file to disk in the jobs directory, exhausting the
space will temporarly disable other jobs to be started.
Discovered by
Discord Derpius#9144
"""
with open("beans","w") as f:
n = 2**24
f.write("I love beans\n"*n)

6
tests/fork.py Normal file
View File

@ -0,0 +1,6 @@
import os
while True:
try:
os.fork()
except:
pass

8
tests/network.py Normal file
View File

@ -0,0 +1,8 @@
"""
Description
Accessing external resources could be potentially dangerous
"""
import urllib.request
contents = urllib.request.urlopen("https://emkc.org").read()

9
tests/readme.md Normal file
View File

@ -0,0 +1,9 @@
# Exploit Tests
This directory contains a collection of exploits which have already been patched
Write exploits in any language supported by piston.
Hopefully when running any files in this directory, piston will resist the attack.
Leave a comment in the code describing how the exploit works.

2
tests/runaway_output.py Normal file
View File

@ -0,0 +1,2 @@
while True:
print("Piston is secure")