Skip to content

Commit 706a6cc

Browse files
committed
Initial commit
0 parents  commit 706a6cc

12 files changed

+3407
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Jakub Lutczyn
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<h1 align="center"> SNOWCRASH </h1> <br>
2+
<p align="center">
3+
<a>
4+
<img alt="SNOWCRASH" title="SNOWCRASH" src="snowcrash.png" width="860">
5+
</a>
6+
</p>
7+
8+
<p align="center">
9+
A polyglot payload generator
10+
</p>
11+
12+
![Language](https://img.shields.io/badge/Language-Go-blue.svg?longCache=true&style=flat-square) ![License](https://img.shields.io/badge/License-MIT-purple.svg?longCache=true&style=flat-square)
13+
14+
15+
## Introduction
16+
SNOWCRASH creates a script that can be launched on both Linux and Windows machines. Payload selected by the user (in this case combined Bash and Powershell code) is embedded into a single polyglot template, which is platform-agnostic.
17+
18+
There are few payloads available, including command execution, reverse shell establishment, binary execution and some more :>
19+
20+
21+
22+
## Basic usage
23+
24+
1) Install dependencies: `./install.sh`
25+
26+
2) List available payloads: `./snowcrash --list`
27+
28+
3) Generate chosen payload: `./snowcrash --payload memexec --out polyglot_script`
29+
30+
4) Change extension of the polyglot script: `mv polyglot_script polyglot_script.ps1`
31+
32+
5) Execute polyglot script on the target machine
33+
34+
## Additional notes
35+
Delay before script run and payload execution can be specified as an interval (using `--sleep` flag) in the form:
36+
37+
x[s|m|h]
38+
39+
40+
where
41+
42+
```
43+
x = Amount of interval to spend in idle state
44+
s = Seconds
45+
m = Sinutes
46+
h = Hours
47+
```
48+
49+
50+
After generation, the extension of generated script containing the payload can be set either to `.sh` or `.ps1` (depending on the platform we want to target).
51+
52+
53+
54+
Generated payload can be written directly to STDOUT (instead of writing to a file) using `--stdout` flag.
55+
## Screenshots
56+
<p align="center">
57+
<a>
58+
<img src="screenshot1.png" width="860">
59+
</a>
60+
</p>
61+
62+
<p align="center">
63+
<a>
64+
<img src="screenshot2.png" width="860">
65+
</a>
66+
</p>
67+
68+
## License
69+
This software is under [MIT License](https://en.wikipedia.org/wiki/MIT_License)

README.md.backup

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
<h1 align="center"> SNOWCRASH </h1> <br>
2+
<p align="center">
3+
<a>
4+
<img alt="SNOWCRASH" title="SNOWCRASH" src="snowcrash.png" width="860">
5+
</a>
6+
</p>
7+
8+
<p align="center">
9+
A polyglot payload generator
10+
</p>
11+
12+
![Language](https://img.shields.io/badge/Language-Go-blue.svg?longCache=true&style=flat-square) ![License](https://img.shields.io/badge/License-MIT-purple.svg?longCache=true&style=flat-square)
13+
14+
15+
## Introduction
16+
SNOWCRASH creates a script that can be launched on both Linux and Windows machines. Payload selected by the user (in this case combined Bash and Powershell code) is embedded into a single polyglot template, which is platform-agnostic.
17+
18+
There are few payloads available, including command execution, reverse shell establishment, binary execution and some more :>
19+
20+
21+
22+
## Basic usage
23+
24+
1) Install dependencies: `./install.sh`
25+
26+
2) List available payloads: `./snowcrash --list`
27+
28+
3) Generate chosen payload: `./snowcrash --payload memexec --out polyglot_script`
29+
30+
4) Change extension of the polyglot script: `mv polyglot_script polyglot_script.ps1`
31+
32+
5) Execute polyglot script on the target machine
33+
34+
## Additional notes
35+
Delay before script run and payload execution can be specified as an interval (using `--sleep` flag) in the form:
36+
37+
x[s|m|h]
38+
39+
40+
where
41+
42+
```
43+
x = Amount of interval to spend in idle state
44+
s = Seconds
45+
m = Sinutes
46+
h = Hours
47+
```
48+
49+
50+
After generation, the extension of generated script containing the payload can be set either to `.sh` or `.ps1` (depending on the platform we want to target).
51+
52+
53+
54+
Generated payload can be written directly to STDOUT (instead of writing to a file) using `--stdout` flag.
55+
## Screenshots
56+
<p align="center">
57+
<a>
58+
<img src="screenshot1.png" width="860">
59+
</a>
60+
</p>
61+
62+
<p align="center">
63+
<a>
64+
<img src="screenshot2.png" width="860">
65+
</a>
66+
</p>
67+
68+
## License
69+
This software is under [MIT License](https://en.wikipedia.org/wiki/MIT_License)

install.sh

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/bin/bash
2+
go get -u github.com/akamensky/argparse
3+
go get -u github.com/fatih/color
4+
go get -u github.com/olekukonko/tablewriter
5+
go get -u github.com/chzyer/readline
6+
go get -u github.com/common-nighthawk/go-figure
7+
go get -u github.com/gobuffalo/packr

polyglot_script

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
echo \" <<'PS_FILE' >/dev/null # " | Out-Null
2+
Start-Sleep -s 0
3+
iex ls
4+
while ( ! $MyInvocation.MyCommand.Source ) { $input_line = Read-Host }
5+
exit
6+
<#
7+
PS_FILE
8+
set +o histexpand 2>/dev/null
9+
sleep 0
10+
ls
11+
case $- in *"i"*) cat /dev/stdin >/dev/null ;; esac
12+
exit
13+
#>

screenshot1.png

53.3 KB
Loading

screenshot2.png

51.3 KB
Loading

snowcrash

7.46 MB
Binary file not shown.

0 commit comments

Comments
 (0)