Exemplo n.º 1
0
def run():
    session = initfuzz()

    s_initialize(name="Request")
    with s_block("Request-Line"):
        s_group("Method", [
            'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS',
            'TRACE'
        ])
        s_delim(" ", name='space-1')
        s_string("/get", name='Request-URI')
        s_delim(" ", name='space-2')
        s_string('HTTP/1.1', name='HTTP-Version')
        s_static("\r\n", name="Request-Line-CRLF")
        s_string("Host:", name="Host-Line")
        s_delim(" ", name="space-3")
        s_string("example.com", name="Host-Line-Value")
        s_static("\r\n", name="Host-Line-CRLF")
        s_string("Connection:", name="Connection-Line")
        s_delim(" ", name="space-4")
        s_string("Keep-Alive", name="Connection-Line-Value")
        s_static("\r\n", name="Connection-Line-CRLF")
        s_string("User-Agent:", name="User-Agent-Line")
        s_delim(" ", name="space-5")
        s_string(
            "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/21.0.1180.83 Safari/537.1",
            name="User-Agent-Line-Value")
        s_static("\r\n", name="User-Agent-Line-CRLF")

    s_static("\r\n", "Request-CRLF")
    session.connect(s_get("Request"))
    session.fuzz(max_depth=1)
Exemplo n.º 2
0
def main() -> None:
    """Run the fuzzer"""
    port = 80
    host = "192.168.99.100"
    protocol = "tcp"

    csv_log = open("fuzz_results_easyshare.csv", "w")
    my_logger = [bf.FuzzLoggerCsv(file_handle=csv_log)]
    target = bf.Target(
        connection=bf.SocketConnection(host, port, proto=protocol))
    session = bf.Session(target=target)

    # FUZZING PARAMETERS
    bf.s_initialize(name="Request")
    with bf.s_block("Request-Line"):
        bf.s_group("Method", [
            'GET', 'HEAD', 'POST', 'PUT', 'DELETE', 'CONNECT', 'OPTIONS',
            'TRACE'
        ])
        bf.s_delim(" ", name='space-1')
        bf.s_string("/index.html", name='Request-URI')
        bf.s_delim(" ", name='space-2')
        bf.s_string('HTTP/1.1', name='HTTP-Version')
        bf.s_static("\r\n", name="Request-Line-CRLF")
    bf.s_static("\r\n", "Request-CRLF")

    session.connect(bf.s_get("Request"))
    session.sleep_time = 1.0
    session.fuzz()
Exemplo n.º 3
0
def main() -> None:
    """Run the fuzzer"""
    port = 9999
    host = "192.168.99.100"
    protocol = "tcp"

    csv_log = open("fuzz_results_GMON.csv", "w")
    my_logger = [bf.FuzzLoggerCsv(file_handle=csv_log)]
    target = bf.Target(connection=bf.SocketConnection(host, port, proto=protocol))
    session = bf.Session(target=target, fuzz_loggers=my_logger)

    # FUZZING PARAMETERS
    bf.s_initialize("GMON")
    bf.s_string("GMON", fuzzable=False)
    bf.s_delim(" ", fuzzable=False)
    bf.s_string("FUZZ") #Fuzzable parameter
    bf.s_static("\r\n")
    
    session.sleep_time = 1.0
    session.connect(bf.s_get("GMON"), callback=get_banner)
    session.fuzz()
Exemplo n.º 4
0
def generate_http_fuzzed_blocks() -> str:
    request_name = "General HTTP fuzzing:"
    s_initialize(name=request_name)

    s_http_string("GET", name="HTTP method")
    s_delim(" ", name="Delimiter between method and path")
    s_http_string("/path", encoding=EncodingTypes.ascii, name="HTTP path")
    s_delim(" ", name="Delimiter between path and version")
    s_http_string("HTTP/1.1\r\n", name="HTTP version")

    s_static("Host: " + ConfigurationManager.config["target"]["hostname"] + "\r\n")

    s_static("Content-Length: 0" + "\r\n")

    s_static("User-Agent: ")
    s_http_string("WapiFuzz", name="User-agent")

    s_delim("\r\n\r\n", name="HTTP headers and body delimiter")

    return request_name
Exemplo n.º 5
0
#!/usr/bin/env python3

import boofuzz
import socket


TARGET_IP                    =    "192.168.1.62"
TARGET_PORT                  =    9999
LOGGER                       =    boofuzz.FuzzLogger(fuzz_loggers=[boofuzz.FuzzLoggerText()])
SESSION                      =    boofuzz.sessions.Session(sleep_time=0.0,fuzz_data_logger
                                                           =LOGGER)
CONNECTION                   =    boofuzz.SocketConnection(TARGET_IP, TARGET_PORT, 
                                                           proto="tcp")
TARGET                       =    boofuzz.sessions.Target(CONNECTION)

SESSION.add_target(TARGET)

boofuzz.s_initialize("trunc")
boofuzz.s_string("TRUN")
boofuzz.s_delim(" ")
boofuzz.s_string("anonymous")
boofuzz.s_static("\r\n")    


SESSION.connect(boofuzz.s_get("trunc"))
SESSION.fuzz()
Exemplo n.º 6
0
def run():
    session = initfuzz()

    s_initialize(name="Request")
    with s_block("Request-Line"):
        s_group("Method", [
            "GET", "HEAD", "POST", "PUT", "DELETE", "CONNECT", "OPTIONS",
            "TRACE", "PURGE"
        ])
        s_delim(" ", name="space-1")
        s_string("/post", name="Request-URI")
        s_delim(" ", name="space-2")
        s_string("HTTP/1.1", name="HTTP-Version")
        s_static("\r\n", name="Request-Line-CRLF")
        s_string("Host:", name="Host-Line")
        s_delim(" ", name="space-3")
        s_string("127.0.0.1:9080", name="Host-Line-Value")
        s_static("\r\n", name="Host-Line-CRLF")
        s_static('User-Agent', name='User-Agent-Header')
        s_delim(':', name='User-Agent-Colon-1')
        s_delim(' ', name='User-Agent-Space-1')
        s_string(
            'Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3223.8 Safari/537.36',
            name='User-Agent-Value')
        s_static('\r\n', name='User-Agent-CRLF'),
        s_static('Accept', name='Accept-Header')
        s_delim(':', name='Accept-Colon-1')
        s_delim(' ', name='Accept-Space-1')
        s_string(
            'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8',
            name='Accept-Value')
        s_static('\r\n', name='Accept-CRLF')
        s_static("Content-Length:", name="Content-Length-Header")
        s_delim(" ", name="space-4")
        s_size("Body-Content",
               output_format="ascii",
               name="Content-Length-Value")
        s_static("\r\n", "Content-Length-CRLF")
        s_static('Connection', name='Connection-Header')
        s_delim(':', name='Connection-Colon-1')
        s_delim(' ', name='Connection-Space-1')
        s_group('Connection-Type', ['keep-alive', 'close'])
        s_static('\r\n', 'Connection-CRLF')
        s_static('Content-Type', name='Content-Type-Header')
        s_delim(':', name='Content-Type-Colon-1')
        s_delim(' ', name='Content-Type-Space-1')
        s_string('application/x-www-form-urlencoded',
                 name='Content-Type-Value')
        s_static('\r\n', name='Content-Type-CRLF')
    s_static("\r\n", "Request-CRLF")

    with s_block("Body-Content"):
        s_string('{"a":"b"}', name="Body-Content-Value")

    session.connect(s_get("Request"))
    session.fuzz(max_depth=1)