簡體   English   中英

使用Scapy的ARP欺騙IP轉發

[英]arp spoffing ip forwarding using scapy

我使用Scapy建立了一個構建Arp欺騙攻擊。 我已經准備好通過Linux IP轉發來進行攻擊。

os.system("echo %s > /proc/sys/net/ipv4/ip_forward" % (f,))

但是我希望能夠即時修改打包並發送已編輯的打包,因此我需要重新舉例說明IP轉發。 我嘗試使用此代碼執行此操作,但是另一台計算機/ Gateaway代理雖然在攻擊者中掛了包,但還是得到了這些包。

#gIP is the gatwaway ip
#arp t able is an arptable I gatherd before I started the attack
#both of them have the correct value so the problem dosent lay there
def pkt_handler(self, pkt):
        pkt.show()
        ip = pkt.getlayer(sp.IP)
        get_mac = lambda x: info.arp_table.get(x, info.arp_table[info.gIP])
        ether = sp.Ether(dst=get_mac(ip.dst))
        sp.sendp(ether/ip)

編輯:經過大量調試並查看了tcpdump之后,我想我知道是什么原因引起了問題。 如果存在客戶端A,服務器B和攻擊者S。當客戶端A發送到服務器B時,可以說是回聲消息。 服務器獲取了該消息並通過發送給攻擊者來響應它,但是即使tcpdump可以,但盡管如此,scapy還是無法嗅探該消息。 不知道是什么原因導致此問題,任何幫助都將是不錯的。

對於ip forward或arp欺騙,使用已知的Alerady工具

arpspoof client server
arpspoof server client

或使用EtterCAP

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM