-
Notifications
You must be signed in to change notification settings - Fork 339
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Oops, forgot to include the actual changes!
- Loading branch information
Showing
40 changed files
with
1,316 additions
and
1,396 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,4 @@ Aaron Portnoy <[email protected]> | |
http://dvlabs.tippingpoint.com/team/aportnoy | ||
|
||
Ryan Sears <[email protected]> | ||
http://talesofacoldadmin.com | ||
http://fitblip.github.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,13 +3,22 @@ | |
# A partial MDNS fuzzer. Could be made to be a DNS fuzzer trivially | ||
# Charlie Miller <[email protected]> | ||
|
||
from sulley import * | ||
from binascii import * | ||
from struct import * | ||
from sulley import s_word, \ | ||
s_initialize, \ | ||
sessions, \ | ||
s_block_start, \ | ||
s_size, \ | ||
s_block_end, \ | ||
s_string, \ | ||
s_repeat, \ | ||
s_group, \ | ||
s_dword, \ | ||
s_binary, \ | ||
s_get | ||
|
||
def insert_questions (sess, node, edge, sock): | ||
node.names['Questions'].value = 1+node.names['queries'].current_reps | ||
node.names['Authority'].value = 1+node.names['auth_nameservers'].current_reps | ||
def insert_questions(sess, node, edge, sock): | ||
node.names['Questions'].value = 1 + node.names['queries'].current_reps | ||
node.names['Authority'].value = 1 + node.names['auth_nameservers'].current_reps | ||
|
||
s_initialize("query") | ||
s_word(0, name="TransactionID") | ||
|
@@ -19,50 +28,50 @@ def insert_questions (sess, node, edge, sock): | |
s_word(1, name="Authority", endian='>') | ||
s_word(0, name="Additional", endian='>') | ||
|
||
######### Queries ################ | ||
# ######## Queries ################ | ||
if s_block_start("query"): | ||
if s_block_start("name_chunk"): | ||
s_size("string", length=1) | ||
if s_block_start("string"): | ||
s_string("A"*10) | ||
s_block_end() | ||
s_block_end() | ||
s_repeat("name_chunk", min_reps=2, max_reps=4, step=1, fuzzable=True, name="aName") | ||
if s_block_start("name_chunk"): | ||
s_size("string", length=1) | ||
if s_block_start("string"): | ||
s_string("A" * 10) | ||
s_block_end() | ||
s_block_end() | ||
s_repeat("name_chunk", min_reps=2, max_reps=4, step=1, fuzzable=True, name="aName") | ||
|
||
s_group("end", values=["\x00", "\xc0\xb0"]) # very limited pointer fuzzing | ||
s_word(0xc, name="Type", endian='>') | ||
s_word(0x8001, name="Class", endian='>') | ||
s_group("end", values=["\x00", "\xc0\xb0"]) # very limited pointer fuzzing | ||
s_word(0xc, name="Type", endian='>') | ||
s_word(0x8001, name="Class", endian='>') | ||
s_block_end() | ||
s_repeat("query", 0, 1000, 40, name="queries") | ||
|
||
|
||
######## Authorities ############ | ||
if s_block_start("auth_nameserver"): | ||
if s_block_start("name_chunk_auth"): | ||
s_size("string_auth", length=1) | ||
if s_block_start("string_auth"): | ||
s_string("A"*10) | ||
s_block_end() | ||
s_block_end() | ||
s_repeat("name_chunk_auth", min_reps=2, max_reps=4, step=1, fuzzable=True, name="aName_auth") | ||
s_group("end_auth", values=["\x00", "\xc0\xb0"]) # very limited pointer fuzzing | ||
if s_block_start("name_chunk_auth"): | ||
s_size("string_auth", length=1) | ||
if s_block_start("string_auth"): | ||
s_string("A" * 10) | ||
s_block_end() | ||
s_block_end() | ||
s_repeat("name_chunk_auth", min_reps=2, max_reps=4, step=1, fuzzable=True, name="aName_auth") | ||
s_group("end_auth", values=["\x00", "\xc0\xb0"]) # very limited pointer fuzzing | ||
|
||
s_word(0xc, name="Type_auth", endian='>') | ||
s_word(0x8001, name="Class_auth", endian='>') | ||
s_dword(0x78, name="TTL_auth", endian='>') | ||
s_size("data_length", length=2, endian='>') | ||
if s_block_start("data_length"): | ||
s_binary("00 00 00 00 00 16 c0 b0") # This should be fuzzed according to the type, but I'm too lazy atm | ||
s_block_end() | ||
s_word(0xc, name="Type_auth", endian='>') | ||
s_word(0x8001, name="Class_auth", endian='>') | ||
s_dword(0x78, name="TTL_auth", endian='>') | ||
s_size("data_length", length=2, endian='>') | ||
if s_block_start("data_length"): | ||
s_binary("00 00 00 00 00 16 c0 b0") # This should be fuzzed according to the type, but I'm too lazy atm | ||
s_block_end() | ||
s_block_end() | ||
s_repeat("auth_nameserver", 0, 1000, 40, name="auth_nameservers") | ||
|
||
s_word(0) | ||
|
||
sess = sessions.session(proto="udp") | ||
target = sessions.target("224.0.0.251", 5353) | ||
sess = sessions.session(proto="udp") | ||
target = sessions.target("224.0.0.251", 5353) | ||
sess.add_target(target) | ||
sess.connect(s_get("query"), callback=insert_questions ) | ||
sess.connect(s_get("query"), callback=insert_questions) | ||
|
||
sess.fuzz() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.