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

Bug fixes and additional testing #114

Open
wants to merge 45 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
2521569
Created Testing Branch and example test
okonekp Feb 2, 2019
8bc70b6
started adding vagrant stuff
captainGeech42 Feb 4, 2019
ec5552c
removed .vagrant
captainGeech42 Feb 4, 2019
1c986a3
updated gitignore
captainGeech42 Feb 4, 2019
b5eacf2
Added tests for server creation
okonekp Feb 5, 2019
602263b
fixed #9
captainGeech42 Feb 5, 2019
316503d
added basic session testing
captainGeech42 Feb 5, 2019
113dc23
Merge pull request #10 from CS362-Group/testing-parker
okonekp Feb 5, 2019
7c09bcc
added pwd for session testing
captainGeech42 Feb 5, 2019
9f54a3b
Merge branch 'testing' of github.com:CS362-Group/EggShell into testing
captainGeech42 Feb 5, 2019
eb0fdbe
finished session testing (#5)
captainGeech42 Feb 5, 2019
8c18a7f
started working on payload test (#6)
captainGeech42 Feb 5, 2019
8b64e8d
Added Multihandler tests and added some pretty text
okonekp Feb 6, 2019
c298ff2
did more payload tests (#6)
captainGeech42 Feb 6, 2019
36e487e
Merge branch 'testing' of github.com:CS362-Group/EggShell into testing
captainGeech42 Feb 6, 2019
d36bbf2
Added helper tests
okonekp Feb 6, 2019
c4d7e47
Merge branch 'testing' of https://github.com/CS362-Group/EggShell int…
okonekp Feb 6, 2019
9f480f5
added headers for session & payload
captainGeech42 Feb 6, 2019
e1e7f27
Merge branch 'testing' of github.com:CS362-Group/EggShell into testing
captainGeech42 Feb 6, 2019
f3889da
Fixed hang on testing multihandler bg server
okonekp Feb 6, 2019
720a64c
Merge branch 'testing' of https://github.com/CS362-Group/EggShell int…
okonekp Feb 6, 2019
7ef27e4
Fixed typo
okonekp Feb 6, 2019
47fb293
fixed payload import error
captainGeech42 Feb 6, 2019
5772167
Merge branch 'testing' of github.com:CS362-Group/EggShell into testing
captainGeech42 Feb 6, 2019
152dd8e
fixed typo (#13)
captainGeech42 Feb 6, 2019
a0630dc
A possibility of resolving 13
okonekp Feb 6, 2019
b76d54a
Noch einmal mit Gefuehl
okonekp Feb 6, 2019
32e55a4
added more payload tests (#6)
captainGeech42 Feb 6, 2019
de30eb4
Merge branch 'testing' of github.com:CS362-Group/EggShell into testing
captainGeech42 Feb 6, 2019
9ca375b
moved bash & teensy to their own files (#6)
captainGeech42 Feb 6, 2019
b655b15
added more teensy payloads (#6)
captainGeech42 Feb 6, 2019
49d6ef9
Merge pull request #16 from CS362-Group/testing
captainGeech42 Feb 6, 2019
e01ae34
added fuzzing code
captainGeech42 Mar 4, 2019
518de3f
updated readme
captainGeech42 Mar 4, 2019
4c7ef65
fixed readme
captainGeech42 Mar 4, 2019
6d5aa22
Added mutant testing, it's 100% effective?
okonekp Mar 5, 2019
19c4873
updated readme
okonekp Mar 5, 2019
845b6b4
added afl outputs
captainGeech42 Mar 6, 2019
b290f5e
Merge pull request #17 from CS362-Group/fuzzing
captainGeech42 Mar 6, 2019
1609e35
Merge branch 'master' into muttesting
captainGeech42 Mar 6, 2019
bfe6678
Merge pull request #18 from CS362-Group/muttesting
captainGeech42 Mar 6, 2019
34e9591
updated readme
captainGeech42 Mar 6, 2019
89aa17e
updated readme
captainGeech42 Mar 6, 2019
513f963
updated readme
captainGeech42 Mar 6, 2019
eb49834
Fixed readme for comsic ray
okonekp Mar 6, 2019
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@ src/espro/.theos
src/esplios/.theos
.keys
downloads
payloads
*.log
.vagrant
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,26 @@ Follow me on twitter: @neoneggplant

<hr style="height:1px; background:#9EA4A9">

## Running Tests
- Install [Vagrant](https://www.vagrantup.com/downloads.html)
- Install [VirtualBox](https://www.virtualbox.org/wiki/Downloads)
- Install `pwntools`: `pip install pwntools`
- Install `expect`: (choose your package manager)
- `apt install expect`
- `yum install expect`
- `pacman -S expect`
- `python test_eggshell.py`

## Running Mutation Testing
- Install `cosmic-ray`: `pip install cosmic-ray`
- `cosmic-ray exec mut_session.sqlite`

## Running Fuzzer
- Install `afl` (see [afl website](/usr/local/share/doc/afl/perf_tips.txt) for instructions)
- Install `python-afl`: `pip install python-afl`
- `afl-fuzz -m 2000 -i fuzzing/in -o fuzzing/out -- python fuzz_eggshell.py`

<hr style="height:1px; background:#9EA4A9">

## Getting Started
- Requires python 2.7
Expand Down
21 changes: 21 additions & 0 deletions Vagrantfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# -*- mode: ruby -*-
# vi: set ft=ruby :

Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/xenial64"

# mount shared folder to test file upload/download with known hashes
config.vm.synced_folder "test/victim_files", "/home/vagrant/my_files"

# disable default file share
config.vm.synced_folder ".", "/vagrant", disabled: true

config.vm.provision "shell", inline: <<-SHELL
# enable password auth (default vagrant:vagrant)
sed -i 's/PasswordAuthentication no/PasswordAuthentication yes/g' /etc/ssh/sshd_config
systemctl restart sshd

# install python
apt install -y python-minimal
SHELL
end
12 changes: 12 additions & 0 deletions fuzz_eggshell.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/python
from modules import server
from modules import helper as h
import sys, os
from eggshell import EggShell
import afl


if __name__ == "__main__":
afl.init()
eggshell = EggShell()
eggshell.menu()
Binary file added fuzzing/afl_out/.cur_input
Binary file not shown.
17 changes: 17 additions & 0 deletions fuzzing/afl_out/crashes/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Command line used to find this crash:

afl-fuzz -m 2000 -i fuzzing/in -o fuzzing/out -- python fuzz_eggshell.py

If you can't reproduce a bug outside of afl-fuzz, be sure to set the same
memory limit. The limit used for this fuzzing session was 1.95 GB.

Need a tool to minimize test cases before investigating the crashes or sending
them to a vendor? Check out the afl-tmin that comes with the fuzzer!

Found any cool bugs in open-source tools using afl-fuzz? If yes, please drop
me a mail at <[email protected]> once the issues are fixed - I'd love to
add your finds to the gallery at:

http://lcamtuf.coredump.cx/afl/

Thanks :-)
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
2
1


n
4

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
3
1

n
4

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
3
1
n
4

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3
1


n
t

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3
1


n
2

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
3
1


����
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3
1


n
3

Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3
1


n
1

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
3
1�

u,4�
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1�
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3
2


n
4
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
3
2


n�n
4
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
3
2


y
n�4
Binary file not shown.
Binary file not shown.
Binary file added fuzzing/afl_out/fuzz_bitmap
Binary file not shown.
28 changes: 28 additions & 0 deletions fuzzing/afl_out/fuzzer_stats
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
start_time : 1551750128
last_update : 1551847879
fuzzer_pid : 2626
cycles_done : 9
execs_done : 1024136
execs_per_sec : 10.36
paths_total : 70
paths_favored : 7
paths_found : 67
paths_imported : 0
max_depth : 7
cur_path : 63
pending_favs : 0
pending_total : 15
variable_paths : 0
stability : 100.00%
bitmap_cvg : 1.63%
unique_crashes : 17
unique_hangs : 6
last_path : 1551831995
last_crash : 1551784448
last_hang : 1551751166
execs_since_crash : 647021
exec_timeout : 180
afl_banner : python
afl_version : 2.52b
target_mode : default
command_line : afl-fuzz -m 2000 -i fuzzing/in -o fuzzing/out -- python fuzz_eggshell.py
7 changes: 7 additions & 0 deletions fuzzing/afl_out/hangs/id:000000,src:000000,op:flip1,pos:0
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1


n
4

7 changes: 7 additions & 0 deletions fuzzing/afl_out/hangs/id:000001,src:000000,op:flip1,pos:0
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
1
1


n
4

7 changes: 7 additions & 0 deletions fuzzing/afl_out/hangs/id:000002,src:000000,op:flip1,pos:2
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3
0


n
4

7 changes: 7 additions & 0 deletions fuzzing/afl_out/hangs/id:000003,src:000000,op:flip1,pos:6
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3
1


4

Binary file not shown.
7 changes: 7 additions & 0 deletions fuzzing/afl_out/hangs/id:000005,src:000009,op:flip1,pos:8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
3
2


y
4
Loading