packet-capture

Android firewall with VpnService

a 夏天 提交于 2019-11-27 06:34:15
I'm trying to implement a simple firewall for android with VpnService for BS project. I choose VpnService because it will be working on non-rooted devices. It will log connections and let you filter connection. (Based on IP) There is an application doing this so it is possible. Google play app store I did some research and found that VpnService creates a Tun interface. Nothing more. (No VPN implementation just a tunnel) It lets you give an adress to this interface and add routes. It returns a file descriptor. You can read outgoing packages and write incoming packages. I created a VpnService

Wireshark localhost traffic capture [closed]

不问归期 提交于 2019-11-27 04:10:08
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 12 months ago . I wrote a simple server app in C which runs on localhost. How to capture localhost traffic using Wireshark? 回答1: If you're using Windows it's not possible - read below. You can use the local address of your machine instead and then you'll be able to capture stuff. See

Scapy fails to sniff packets when using multiple threads

 ̄綄美尐妖づ 提交于 2019-11-27 03:30:47
问题 I'll try to demonstrate my problem with a simplified example. Following is a very simple (single threaded) packet sniffer (ICMP): from scapy.all import * m_iface = "wlan0" m_dst = "192.168.0.1" def print_summary(pkt): print pkt.summary() def plain_sniff(): sniff(iface = m_iface, count = 10, filter = "icmp and src {0}".format(m_dst), prn = print_summary) This sniffer works just fine and I get the output: WARNING: No route found for IPv6 destination :: (no default route?) Ether / IP / ICMP 192

How do I programatically collect packets from passively sniffing? [closed]

…衆ロ難τιáo~ 提交于 2019-11-26 23:17:50
问题 I want to test the vulnerability of the server I just wrote against man in the middle attacks. How (on Mac OS X) do I analyze packets. (I'll be checking where they are going, pulling information from if they are heading to my server, and seeing what all is available) Then I'll figure out a way to encrypt everything... but first things first. Any help on packet sniffing would be greatly appreciated. My preferred language is java. But I can do C++. so, my question is: "Is there any sort of API