Skip to content

Instantly share code, notes, and snippets.

How to Build a Cuckoo Sandbox Malware Analysis System

I had a heck of a time getting a Cuckoo sandbox running, and below I hope to help you get one up and running relatively quickly by detailing out the steps and gotchas I stumbled across along the way. I mention this in the references at the end of this gist, but what you see here is heavily influenced by this article from Nviso

Build your Linux Cuckoo VM

  1. Setup a Ubuntu 16.04 64-bit desktop VM (download here) in VMWare with the following properties:
  • 100GB hard drive
  • 2 procs
  • 8 gigs of RAM
@0ccupi3R
0ccupi3R / gist:c42e47a1b456b058f9fd679d9e72e260
Created July 2, 2019 19:51 — forked from dav3860/gist:5345656
Cisco ASA/PIX config for logstash.
/etc/logstash/logstash.conf :
# We handle the syslog part of the Cisco PIX/ASA messages
grok {
tags => "cisco-fw"
patterns_dir => "/etc/logstash/patterns"
pattern => "^<%{POSINT:syslog_pri}>(?:(%{TIMESTAMP_ISO8601:timestamp8601} |%{CISCOTIMESTAMP:timestamp} ))?%{SYSLOGHOST:logsource}?[ :]+%{GREEDYDATA:syslog_message}"
}
syslog_pri {
tags => "cisco-fw"
def extract_values(obj, key):
"""Recursively pull values of specified key from nested JSON."""
arr = []
def extract(obj, arr, key):
"""Return all matching values in an object."""
if isinstance(obj, dict):
for k, v in obj.items():
if isinstance(v, (dict, list)):
extract(v, arr, key)
import os
import binascii
from array import array
from unicorn import *
from unicorn.x86_const import *
import string
import itertools
import pexpect
@0ccupi3R
0ccupi3R / slack_webhook_post.py
Created August 21, 2019 08:25 — forked from devStepsize/slack_webhook_post.py
POST a JSON payload to a Slack Incoming Webhook using Python requests
'''
This is an example of how to send data to Slack webhooks in Python with the
requests module.
Detailed documentation of Slack Incoming Webhooks:
https://api.slack.com/incoming-webhooks
'''
import json
import requests
@0ccupi3R
0ccupi3R / example_paramiko_with_tty.py
Created August 28, 2019 13:58 — forked from rtomaszewski/example_paramiko_with_tty.py
example paramiko script with interactive terminal
import paramiko
import time
import re
bastion_ip='ip'
bastion_pass='pass'
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy( paramiko.AutoAddPolicy() )
ssh.connect(bastion_ip, username='root', password=bastion_pass)
@0ccupi3R
0ccupi3R / README.md
Created September 27, 2019 07:22 — forked from tuxmartin/README.md
Python NMAP scanner - vystup v HTML tabulce

apt-get install python-nmap

@0ccupi3R
0ccupi3R / dlAttachments.py
Created September 28, 2019 15:50 — forked from baali/dlAttachments.py
Python script to download all gmail attachments.
# Something in lines of http://stackoverflow.com/questions/348630/how-can-i-download-all-emails-with-attachments-from-gmail
# Make sure you have IMAP enabled in your gmail settings.
# Right now it won't download same file name twice even if their contents are different.
import email
import getpass, imaplib
import os
import sys
detach_dir = '.'
@0ccupi3R
0ccupi3R / check_ips_and_ports.py
Created October 4, 2019 14:38 — forked from awesomebytes/check_ips_and_ports.py
Script to check if IPs in your network have specific port open Python only
#!/usr/bin/env python
import socket
from multiprocessing import Process, Queue
import time
import argparse
"""
Tools to scan network from python.
Mostly taken from stack overflow and mixed together.
@0ccupi3R
0ccupi3R / mac-vendor.txt
Created November 5, 2019 18:50 — forked from aallan/mac-vendor.txt
List of MAC addresses with vendors identities
000000 Officially Xerox
000001 SuperLAN-2U
000002 BBN (was internal usage only, no longer used)
000003 XEROX CORPORATION
000004 XEROX CORPORATION
000005 XEROX CORPORATION
000006 XEROX CORPORATION
000007 XEROX CORPORATION
000008 XEROX CORPORATION
000009 powerpipes?