Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
94f742b
commit 2d14526
Showing
25 changed files
with
1,682 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
Authors: Joshua Pitts the.midnite.runr 'at' gmail <d ot > com | ||
Travis Morrow gitwired [at] gmail "d ot' com | ||
Copyright (c) 2016, Joshua Pitts, Travis Morrow | ||
All rights reserved. | ||
Redistribution and use in source and binary forms, with or without modification, | ||
are permitted provided that the following conditions are met: | ||
1. Redistributions of source code must retain the above copyright notice, | ||
this list of conditions and the following disclaimer. | ||
2. Redistributions in binary form must reproduce the above copyright notice, | ||
this list of conditions and the following disclaimer in the documentation | ||
and/or other materials provided with the distribution. | ||
3. Neither the name of the copyright holder nor the names of its contributors | ||
may be used to endorse or promote products derived from this software without | ||
specific prior written permission. | ||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE | ||
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | ||
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | ||
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | ||
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | ||
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
POSSIBILITY OF SUCH DAMAGE. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
#!/bin/bash | ||
|
||
#take argument 1 and build | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 go_x86_script.go output.exe" | ||
exit | ||
fi | ||
|
||
# take the first argument and build an x86 binary from go | ||
filename2=$(basename $2) | ||
sans_extension="${filename2%.*}" | ||
|
||
echo [*] Copy Files to tmp for building | ||
|
||
cp $1 /tmp/$sans_extension.py | ||
|
||
cd /tmp/ | ||
|
||
echo [*] Building... | ||
|
||
wine /root/.wine/drive_c/Python27/python.exe /usr/share/pyinstaller/pyinstaller.py -F -c $sans_extension.py | ||
|
||
cd - 1> /dev/null | ||
|
||
echo [*] Copy $2 to output | ||
|
||
cp /tmp/dist/$2 ./output/$2 | ||
|
||
echo [*] Cleaning up | ||
|
||
rm /tmp/$sans_extension.py | ||
|
||
rm /tmp/$sans_extension.spec | ||
|
||
rm -rf /tmp/build/ | ||
|
||
rm -rf /tmp/dist/ | ||
|
||
echo [*] Done | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 go_x86_script.go output.exe" | ||
exit | ||
fi | ||
|
||
# take the first argument and build an x86 binary from go | ||
filename=$(basename $1) | ||
filename2=$(basename $2) | ||
sans_extension="${filename2%.*}" | ||
|
||
echo [*] Copy Files to tmp for building | ||
mkdir -p /tmp/MemoryModule/build/ | ||
|
||
rsync -r ./MemoryModule/buildx64/ /tmp/MemoryModule/build/ | ||
|
||
cp ./MemoryModule/MemoryModule.h /tmp/MemoryModule/ | ||
|
||
cp $1 /tmp/$sans_extension.go | ||
|
||
cd /tmp/ | ||
echo [*] Building... | ||
export GOOS=windows; export GOARCH=amd64; export CGO_ENABLED=1; export CXX=x86_64-w64-mingw32-g++; export CC=x86_64-w64-mingw32-gcc | ||
CXX=x86_64-w64-mingw32-g++; CC=x86_64-w64-mingw32-gcc; CGO_LDFLAGS="-g -lm" GOGCCFLAGS="-m64 -fmessage-length=0" CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build $sans_extension.go | ||
|
||
echo [*] Building complete | ||
|
||
rm -rf /tmp/MemoryModule | ||
|
||
cd - 1> /dev/null | ||
|
||
echo [*] Copy $2 to output | ||
|
||
cp /tmp/$2 ./output/ | ||
|
||
echo [*] Cleaning up | ||
|
||
rm /tmp/$2 | ||
rm /tmp/$sans_extension.go | ||
|
||
echo [*] Done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
if [ "$#" -ne 2 ]; then | ||
echo "Usage: $0 go_x86_script.go output.exe" | ||
exit | ||
fi | ||
|
||
# take the first argument and build an x86 binary from go | ||
filename=$(basename $1) | ||
filename2=$(basename $2) | ||
sans_extension="${filename2%.*}" | ||
|
||
echo [*] Copy Files to tmp for building | ||
mkdir -p /tmp/MemoryModule/build/ | ||
|
||
rsync -r ./MemoryModule/build686/ /tmp/MemoryModule/build/ | ||
|
||
cp ./MemoryModule/MemoryModule.h /tmp/MemoryModule/ | ||
|
||
cp $1 /tmp/$sans_extension.go | ||
|
||
cd /tmp/ | ||
echo [*] Building... | ||
export GOOS=windows; export GOARCH=386; export CGO_ENABLED=1; export CXX=i686-w64-mingw32-g++; export CC=i686-w64-mingw32-gcc | ||
GOOS=windows; CXX=i686-w64-mingw32-g++; CC=i686-w64-mingw32-gcc; GCCFLAGS="-m32 -fmessage-length=0" CGO_ENABLED=1 GOOS=windows GOARCH=386 go build $sans_extension.go | ||
|
||
echo [*] Building complete | ||
|
||
rm -rf /tmp/MemoryModule | ||
|
||
cd - 1> /dev/null | ||
|
||
echo [*] Copy $2 to output | ||
|
||
cp /tmp/$2 ./output/ | ||
|
||
echo [*] Cleaning up | ||
|
||
rm /tmp/$2 | ||
rm /tmp/$sans_extension.go | ||
|
||
echo [*] Done |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#!/usr/bin/env python | ||
|
||
import ast | ||
import sys | ||
try: | ||
from configobj import ConfigObj | ||
except: | ||
print "[x] Error - You need to have configobj installed to use this tool" | ||
exit(-1) | ||
from encryption import otp_full | ||
from encryption import otp_key | ||
from encryption import env | ||
|
||
|
||
class make_payload(): | ||
|
||
def __init__(self, payload, config): | ||
self.payload = payload | ||
self.lookup_table = '' | ||
self.inital_iteration = 0 | ||
self.config = ConfigObj(config) | ||
#print self.payload.encode('hex') | ||
self.parse_config() | ||
self.main() | ||
|
||
def parse_config(self): | ||
for item in self.config: | ||
#print item, ":", self.config[item] | ||
pass | ||
|
||
def main(self): | ||
if self.config['Overall']['Encryption_Type'].lower() == 'otp' and self.config['otp_settings']['otp_type'] == 'full': | ||
print '[*] Using full file OTP' | ||
pad = self.config['otp_settings']['pad'] | ||
otp_type = self.config['otp_settings']['otp_type'] | ||
byte_width = self.config['otp_settings']['byte_width'] | ||
payload_type = self.config['Overall']['payload_type'].lower() | ||
minus_bytes = int(self.config['Overall']['minus_bytes']) | ||
scan_dir = self.config['otp_settings']['scan_dir'].rstrip("\\") | ||
output_type = self.config['Overall']['output_type'].lower() | ||
pad_max = self.config['otp_settings']['pad_max'] | ||
clean_output = self.config['Overall'].as_bool('clean_output') | ||
otp_full.otp_full(pad, self.payload, byte_width, otp_type, payload_type, minus_bytes, scan_dir, output_type, pad_max,clean_output) | ||
|
||
elif self.config['Overall']['Encryption_Type'].lower() == 'otp' and self.config['otp_settings']['otp_type'].lower() == 'key': | ||
print '[*] Using key based OTP' | ||
pad = self.config['otp_settings']['pad'] | ||
otp_type = self.config['otp_settings']['otp_type'] | ||
payload_type = self.config['Overall']['payload_type'].lower() | ||
minus_bytes = int(self.config['Overall']['minus_bytes']) | ||
scan_dir = self.config['otp_settings']['scan_dir'].rstrip("\\") | ||
output_type = self.config['Overall']['output_type'].lower() | ||
key_iterations = self.config['Overall']['key_iterations'] | ||
pad_max = self.config['otp_settings']['pad_max'] | ||
clean_output = self.config['Overall'].as_bool('clean_output') | ||
otp_key.otp_key(pad, self.payload, otp_type, payload_type, minus_bytes, scan_dir, output_type, key_iterations, pad_max, clean_output) | ||
|
||
elif self.config['Overall']['Encryption_Type'].lower() == 'env': | ||
print '[*] Using Symmetric encryption' | ||
key_config = self.config['symmetric_settings_win'] | ||
payload_type = self.config['Overall']['payload_type'].lower() | ||
minus_bytes = int(self.config['Overall']['minus_bytes']) | ||
output_type = self.config['Overall']['output_type'].lower() | ||
key_iterations = self.config['Overall']['key_iterations'] | ||
clean_output = self.config['Overall'].as_bool('clean_output') | ||
env.env_encrypt(key_config, self.payload, payload_type, minus_bytes, output_type, key_iterations, clean_output) | ||
|
||
|
||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) < 3: | ||
print "Usage:", sys.argv[0], "input_file_to_encode", "config" | ||
exit(-1) | ||
|
||
test = make_payload(sys.argv[1], sys.argv[2]) | ||
|
Empty file.
Oops, something went wrong.