├── README.md ├── autofuzz.sh ├── fuzzer.c └── signalfuzzer.py /README.md: -------------------------------------------------------------------------------- 1 | #### SignalSEC MobileFuzzing-101 Project 2 | 3 | [FuzzingMobile-101](http://www.signalsec.com/blog/fuzzing-mobile-101/) 4 | -------------------------------------------------------------------------------- /autofuzz.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # .m4a 4 | echo -n "Ses uzantisini gir: " 5 | read uzanti 6 | 7 | echo -n "Ses boyutunu gir: " 8 | read dosyaboyutu 9 | 10 | echo -n "Kac dosya olusturulsun?: " 11 | read dosyanum 12 | 13 | # dosyaboyutu=208 14 | 15 | offset=0 16 | 17 | # fuzz değeri 18 | fuzzval=255 19 | 20 | i=1 21 | while [ $i -lt $dosyanum ] 22 | do 23 | cp ./Alarm.m4r ./$i$uzanti 24 | ./fuzzer $dosyaboyutu $offset $fuzzval ./$i$uzanti 25 | 26 | let "offset += 1" 27 | let "i += 1" 28 | done 29 | -------------------------------------------------------------------------------- /fuzzer.c: -------------------------------------------------------------------------------- 1 | #include //standart I/O 2 | #include //data types 3 | #include //memory management declarations 4 | #include //file control options 5 | #include //standart library definitions 6 | #include //standard symbolic constants and types 7 | 8 | int main(int argc, char const *argv[]) 9 | { 10 | int fd = 0; 11 | char * p = NULL; 12 | char * name = NULL; 13 | unsigned int file_size = 0; 14 | unsigned int file_offset = 0; 15 | unsigned int file_value = 0; 16 | 17 | if (argc < 2) 18 | { 19 | printf("[-] Hata: eksik arguman\n"); 20 | printf("[?] ./fuzzer \n"); 21 | return 1; 22 | } else { 23 | file_size = atol(argv[1]); // 24 | file_offset = atol(argv[2]); 25 | file_value = atol(argv[3]); 26 | name = argv[4]; 27 | } 28 | 29 | //dosya aciliyor 30 | fd = open(name, O_RDWR); // O_RDWR -> open for reading and writing 31 | if (fd < 0) 32 | { 33 | perror("open"); 34 | exit(1); 35 | } 36 | 37 | //mmap dosyası 38 | //map pages of memory 39 | 40 | p = mmap(0, file_size, PROT_READ | PROT_WRITE, MAP_SHARED, fd, 0); 41 | if ((int) p == -1) 42 | { 43 | perror("mmap"); 44 | close(fd); 45 | exit(1); 46 | } 47 | 48 | //dosya degisimi 49 | 50 | printf("[+] offset: 0x%08x (deger: 0x%08x)\n", file_offset, file_value); 51 | fflush(stdout); 52 | p[file_offset] = file_value; 53 | 54 | close(fd); 55 | 56 | //unmap pages of memory 57 | munmap(p, file_size); 58 | 59 | return 0; 60 | } 61 | -------------------------------------------------------------------------------- /signalfuzzer.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # -*- coding:utf-8 -*- 3 | import sys 4 | import os 5 | 6 | def SignalSEC(): 7 | print "\n" 8 | print "SignalSEC MobileBrowser Audio Fuzzer" 9 | print " Fatih Erdoğan @ FeCassie " 10 | print " http://www.signalsec.com " 11 | print "\n" 12 | 13 | def sesList(): 14 | d = os.getcwd() 15 | print "[*] Bulunduğunuz dizin: %s" % (d) 16 | global ses 17 | ses = raw_input("[*] Fuzz edilecek ses türünü gir: ") 18 | dizin = os.listdir(d) 19 | print "[*] %s uzantili dosyalar: " % (ses) 20 | for i in dizin: 21 | if i.endswith(ses): 22 | print i 23 | 24 | doctype = '\n' 25 | refresh = '\n' 27 | banner = '

SignalSEC MobileBrowser Audio Fuzzer

' 28 | banner += '

Fatih ERDOGAN @ FeCassie

' 29 | banner += 'signalsec.com' 30 | header = '\n' 34 | 35 | SignalSEC() 36 | sesList() 37 | dosyasayi = int(raw_input("[*] oluşturulacak dosya sayısını gir: ")) 38 | 39 | mesaj = "\n[+] signalsec rocks!\n" 40 | print mesaj 41 | print "-" * len(mesaj) 42 | i = 0 43 | while i < dosyasayi: 44 | try: 45 | i += 1 46 | fuzz = doctype + refresh + "%d" % (i+1) + ".html" 47 | fuzz += refresh2 + banner + header + "\n" + aud + "%d" % (i) + ses + aud2 48 | dosya = open("%d" % (i) + ".html", "w") 49 | dosya.write(fuzz) 50 | 51 | print "[+] %s.html olusturuldu." % (i) 52 | except: 53 | print "[-] .html dosyaları oluşturulamadı!" 54 | sys.exit() 55 | 56 | 57 | --------------------------------------------------------------------------------