This file contains hidden or 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 argparse | |
class RandInt: | |
def __init__(self, seed): | |
self.seed = seed | |
def rand_int_modulus(self, modulus): | |
ix = self.seed | |
ix = 16807*(ix % 127773) - 2836*(ix / 127773) & 0xFFFFFFFF |
This file contains hidden or 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 argparse | |
""" | |
Shiotob DGA | |
Generates domains for the Shiotob malware | |
- top level domains alternate between '.net' and '.com' | |
- domains are between 14 and 19 characters long | |
- domains consist of all letters and digits 123945 |
This file contains hidden or 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
def map_to_lowercase_letter(s): | |
return ord('a') + ((s - ord('a')) % 26) | |
def next_domain(domain): | |
dl = [ord(x) for x in list(domain)] | |
dl[0] = map_to_lowercase_letter(dl[0] + dl[3]) | |
dl[1] = map_to_lowercase_letter(dl[0] + 2*dl[1]) | |
dl[2] = map_to_lowercase_letter(dl[0] + dl[2] - 1) | |
dl[3] = map_to_lowercase_letter(dl[1] + dl[2] + dl[3]) | |
return ''.join([chr(x) for x in dl]) |
This file contains hidden or 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
''' | |
Filename : TinBaDGA.py | |
Developer : Garage4Hackers | |
Greets : b0nd, FB1H2S, "vinnu", l0rdDeathStorm, nightrover and all g4h team | |
''' | |
import os, time | |
utility = "TinBaDGA" |
This file contains hidden or 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 argparse | |
from datetime import datetime | |
def generate_necurs_domain(sequence_nr, magic_nr, date): | |
def pseudo_random(value): | |
loops = (value & 0x7F) + 21 | |
for index in range(loops): | |
value += ((value*7) ^ (value << 15)) + 8*index - (value >> 5) | |
value &= ((1 << 64) - 1) |
This file contains hidden or 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 argparse | |
class RandInt: | |
def __init__(self, seed): | |
self.seed = seed | |
def rand_int_modulus(self, modulus): | |
ix = self.seed | |
ix = 16807*(ix % 127773) - 2836*(ix / 127773) & 0xFFFFFFFF |
This file contains hidden or 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 json | |
import argparse | |
from datetime import datetime | |
import time | |
def get_sld(length, seed): | |
sld = "" | |
modulo = 541 * length + 4 | |
a = length * length |
This file contains hidden or 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
#!/bin/bash | |
# bash generate random alphanumeric string | |
# | |
# bash generate random 32 character alphanumeric string (upper and lowercase) and | |
NEW_UUID=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1) | |
# bash generate random 32 character alphanumeric string (lowercase only) | |
cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 32 | head -n 1 |
This file contains hidden or 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 | |
import re | |
import datetime, time | |
import argparse | |
import nids | |
end_states = (nids.NIDS_CLOSE, nids.NIDS_TIMEOUT, nids.NIDS_RESET) |
This file contains hidden or 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 | |
if len(sys.argv) != 3: | |
print "USAGE: %s <KFFSE_XHKYOKXOHOFEDM^E_Y> <0x2a>" % (sys.argv[0]) | |
sys.exit(1) | |
flag = sys.argv[1] | |
key = int(sys.argv[2], 16) |