ibpcap 是一個網絡數據包捕獲函數庫,功能非常強大,Linux 下著名的 tcpdump 就是以它為基礎的。
libpcap主要的作用
libpcap 的安裝
libpcap 的抓包框架
利用 libpcap 函數庫開發應用程序的基本步驟:
抓包詳細步驟
首先要使用 libpcap,我們必須包含 pcap.h 頭文件,可以在 /usr/local/include/pcap/pcap.h 找到,其中包含了每個類型定義的詳細說明。
1、獲取網絡接口設備名
char *pcap_lookupdev(char *errbuf);
功能:
得到可用的網絡設備名指針
參數:
errbuf:存放出錯信息字符串,里面有個宏定義:PCAP_ERRBUF_SIZE,為錯誤緩沖區大小
返回值:
成功返回設備名指針(第一個合適的網絡接口的字符串指針);
失敗返回 NULL,同時,errbuf 存放出錯信息字符串。
實例如下:
char error_content[PCAP_ERRBUF_SIZE]={0}; // 出錯信息
char *dev=pcap_lookupdev(error_content);
if(NULL==dev)
{
printf(error_content);
exit(-1);
}
2、獲取網絡號(ip 地址)和掩碼
int pcap_lookupnet( char *device,
bpf_u_int32 *netp,
bpf_u_int32 *maskp,
char *errbuf );
功能:
獲取指定網卡的 ip 地址,子網掩碼
參數:
device:網絡設備名,為第一步獲取的網絡接口字符串(pcap_lookupdev() 的返回值 ),也可人為指定,如“eth0”。
netp:存放 ip 地址的指針,bpf_u_int32 為 32 位無符號整型
maskp:存放子網掩碼的指針,bpf_u_int32 為 32 位無符號整型
errbuf:存放出錯信息
返回值:
成功返回 0,失敗返回 -1
需要C/C++ Linux服務器架構師學習資料私信“資料”(資料包括C/C++,Linux,golang技術,Nginx,ZeroMQ,MySQL,Redis,fastdfs,MongoDB,ZK,流媒體,CDN,P2P,K8S,Docker,TCP/IP,協程,DPDK,ffmpeg等),免費分享
實例如下:
char error_content[PCAP_ERRBUF_SIZE]={0}; // 出錯信息
char *dev=pcap_lookupdev(error_content);
if(NULL==dev)
{
printf(error_content);
exit(-1);
}
bpf_u_int32 netp=0, maskp=0;
pcap_t * pcap_handle=NULL;
int ret=0;
//獲得網絡號和掩碼
ret=pcap_lookupnet(dev, &netp, &maskp, error_content);
if(ret==-1)
{
printf(error_content);
exit(-1);
}
3、打開網絡接口
pcap_t *pcap_open_live( const char *device,
int snaplen,
int promisc,
int to_ms,
char *ebuf );
功能:
打開一個用于捕獲數據的網絡接口
參數:
device:網絡接口的名字,為第一步獲取的網絡接口字符串(pcap_lookupdev() 的返回值 ),也可人為指定,如“eth0”。
snaplen:捕獲數據包的長度,長度不能大于 65535 個字節。
promise:“1” 代表混雜模式,其它非混雜模式。什么為混雜模式,請看《原始套接字編程》。
to_ms:指定需要等待的毫秒數,超過這個數值后,獲取數據包的函數就會立即返回(這個函數不會阻塞,后面的抓包函數才會阻塞)。0 表示一直等待直到有數據包到來。
ebuf:存儲錯誤信息。
返回值:
返回 pcap_t 類型指針,后面的所有操作都要使用這個指針。
實例如下:
char error_content[PCAP_ERRBUF_SIZE]={0}; // 出錯信息
char *dev=pcap_lookupdev(error_content); // 獲取網絡接口
if(NULL==dev)
{
printf(error_content);
exit(-1);
}
// 打開網絡接口
pcap_t * pcap_handle=pcap_open_live(dev, 1024, 1, 0, error_content);
if(NULL==pcap_handle)
{
printf(error_content);
exit(-1);
}
4、獲取數據包
a)
const u_char *pcap_next(pcap_t *p, struct pcap_pkthdr *h);
功能:
捕獲一個網絡數據包,收到一個數據包立即返回
參數:
p:pcap_open_live()返回的 pcap_t 類型的指針
h:數據包頭
pcap_pkthdr 類型的定義如下:
struct pcap_pkthdr
{
struct timeval ts; // 抓到包的時間
bpf_u_int32 caplen; // 表示抓到的數據長度
bpf_u_int32 len; // 表示數據包的實際長度
}
len 和 caplen的區別:
因為在某些情況下你不能保證捕獲的包是完整的,例如一個包長 1480,但是你捕獲到 1000 的時候,可能因為某些原因就中止捕獲了,所以 caplen 是記錄實際捕獲的包長,也就是 1000,而 len 就是 1480。
返回值:
成功返回捕獲數據包的地址,失敗返回 NULL
實例如下:
const unsigned char *p_packet_content=NULL; // 保存接收到的數據包的起始地址
pcap_t *pcap_handle=NULL;
struct pcap_pkthdr protocol_header;
pcap_handle=pcap_open_live("eth0", 1024, 1, 0,NULL);
p_packet_content=pcap_next(pcap_handle, &protocol_header);
//p_packet_content 所捕獲數據包的地址
printf("Capture Time is :%s",ctime((const time_t *)&protocol_header.ts.tv_sec)); // 時間
printf("Packet Lenght is :%d\n",protocol_header.len); // 數據包的實際長度
// 分析以太網中的 源mac、目的mac
struct ether_header *ethernet_protocol=NULL;
unsigned char *p_mac_string=NULL; // 保存mac的地址,臨時變量
ethernet_protocol=(struct ether_header *)p_packet_content; //struct ether_header 以太網幀頭部
p_mac_string=(unsigned char *)ethernet_protocol->ether_shost;//獲取源mac
printf("Mac Source Address is %02x:%02x:%02x:%02x:%02x:%02x\n",*(p_mac_string+0),*(p_mac_string+1),*(p_mac_string+2),*(p_mac_string+3),*(p_mac_string+4),*(p_mac_string+5));
p_mac_string=(unsigned char *)ethernet_protocol->ether_dhost;//獲取目的mac
printf("Mac Destination Address is %02x:%02x:%02x:%02x:%02x:%02x\n",*(p_mac_string+0),*(p_mac_string+1),*(p_mac_string+2),*(p_mac_string+3),*(p_mac_string+4),*(p_mac_string+5));
b)
int pcap_loop( pcap_t *p,
int cnt,
pcap_handler callback,
u_char *user );
功能:
循環捕獲網絡數據包,直到遇到錯誤或者滿足退出條件。每次捕獲一個數據包就會調用 callback 指定的回調函數,所以,可以在回調函數中進行數據包的處理操作。
參數:
p:pcap_open_live()返回的 pcap_t 類型的指針。
cnt:指定捕獲數據包的個數,一旦抓到了 cnt 個數據包,pcap_loop 立即返回。如果是 -1,就會永無休止的捕獲,直到出現錯誤。
callback:回調函數,名字任意,根據需要自行起名。
user:向回調函數中傳遞的參數。
callback 回調函數的定義:
void callback( u_char *userarg,
const struct pcap_pkthdr * pkthdr,
const u_char * packet )
userarg:pcap_loop() 的最后一個參數,當收到足夠數量的包后 pcap_loop 會調用callback 回調函數,同時將pcap_loop()的user參數傳遞給它
pkthdr:是收到數據包的 pcap_pkthdr 類型的指針,和 pcap_next() 第二個參數是一樣的。
packet :收到的數據包數據
返回值:
成功返回0,失敗返回負數
實例如下:
if( pcap_loop(pcap_handle, -1, ethernet_protocol_callback, NULL) < 0 )
{
perror("pcap_loop");
}
/*******************************回調函數************************************/
void ethernet_protocol_callback(unsigned char *argument,const struct pcap_pkthdr *packet_heaher,const unsigned char *packet_content)
{
unsigned char *mac_string; //
struct ether_header *ethernet_protocol;
unsigned short ethernet_type; //以太網類型
printf("----------------------------------------------------\n");
printf("%s\n", ctime((time_t *)&(packet_heaher->ts.tv_sec))); //轉換時間
ethernet_protocol=(struct ether_header *)packet_content;
mac_string=(unsigned char *)ethernet_protocol->ether_shost;//獲取源mac地址
printf("Mac Source Address is %02x:%02x:%02x:%02x:%02x:%02x\n",*(mac_string+0),*(mac_string+1),*(mac_string+2),*(mac_string+3),*(mac_string+4),*(mac_string+5));
mac_string=(unsigned char *)ethernet_protocol->ether_dhost;//獲取目的mac
printf("Mac Destination Address is %02x:%02x:%02x:%02x:%02x:%02x\n",*(mac_string+0),*(mac_string+1),*(mac_string+2),*(mac_string+3),*(mac_string+4),*(mac_string+5));
ethernet_type=ntohs(ethernet_protocol->ether_type);//獲得以太網的類型
printf("Ethernet type is :%04x\n",ethernet_type);
switch(ethernet_type)
{
case 0x0800:printf("The network layer is IP protocol\n");break;//ip
case 0x0806:printf("The network layer is ARP protocol\n");break;//arp
case 0x0835:printf("The network layer is RARP protocol\n");break;//rarp
default:break;
}
usleep(800*1000);
}
c)
int pcap_dispatch(pcap_t * p, int cnt, pcap_handler callback, u_char * user);
這個函數和 pcap_loop() 非常類似,只是在超過 to_ms 毫秒后就會返回( to_ms 是pcap_open_live() 的第4個參數 )
5、釋放網絡接口
void pcap_close(pcap_t *p);
功能:
關閉 pcap_open_live() 打開的網絡接口(即其返回值,pcap_t 類型指針),并釋放相關資源。注意,操作完網絡接口,應該釋放其資源。
參數:
p:需要關閉的網絡接口,pcap_open_live() 的返回值(pcap_t 類型指針)
返回值:
無
實例如下:
// 打開網絡接口
pcap_t * pcap_handle=pcap_open_live("eth0", 1024, 1, 0, error_content);
if(NULL==pcap_handle)
{
printf(error_content);
exit(-1);
}
//// ……
//// ……
pcap_close(pcap_handle); //釋放網絡接口
例子1(接收一個數據包):
#include <stdio.h>
#include <pcap.h>
#include <arpa/inet.h>
#include <time.h>
#include <stdlib.h>
struct ether_header
{
unsigned char ether_dhost[6]; //目的mac
unsigned char ether_shost[6]; //源mac
unsigned short ether_type; //以太網類型
};
#define BUFSIZE 1514
int main(int argc,char *argv[])
{
pcap_t * pcap_handle=NULL;
char error_content[100]=""; // 出錯信息
const unsigned char *p_packet_content=NULL; // 保存接收到的數據包的起始地址
unsigned char *p_mac_string=NULL; // 保存mac的地址,臨時變量
unsigned short ethernet_type=0; // 以太網類型
char *p_net_interface_name=NULL; // 接口名字
struct pcap_pkthdr protocol_header;
struct ether_header *ethernet_protocol;
//獲得接口名
p_net_interface_name=pcap_lookupdev(error_content);
if(NULL==p_net_interface_name)
{
perror("pcap_lookupdev");
exit(-1);
}
//打開網絡接口
pcap_handle=pcap_open_live(p_net_interface_name,BUFSIZE,1,0,error_content);
p_packet_content=pcap_next(pcap_handle,&protocol_header);
printf("------------------------------------------------------------------------\n");
printf("capture a Packet from p_net_interface_name :%s\n",p_net_interface_name);
printf("Capture Time is :%s",ctime((const time_t *)&protocol_header.ts.tv_sec));
printf("Packet Lenght is :%d\n",protocol_header.len);
/*
*分析以太網中的 源mac、目的mac
*/
ethernet_protocol=(struct ether_header *)p_packet_content;
p_mac_string=(unsigned char *)ethernet_protocol->ether_shost;//獲取源mac
printf("Mac Source Address is %02x:%02x:%02x:%02x:%02x:%02x\n",*(p_mac_string+0),*(p_mac_string+1),*(p_mac_string+2),*(p_mac_string+3),*(p_mac_string+4),*(p_mac_string+5));
p_mac_string=(unsigned char *)ethernet_protocol->ether_dhost;//獲取目的mac
printf("Mac Destination Address is %02x:%02x:%02x:%02x:%02x:%02x\n",*(p_mac_string+0),*(p_mac_string+1),*(p_mac_string+2),*(p_mac_string+3),*(p_mac_string+4),*(p_mac_string+5));
/*
*獲得以太網的數據包的地址,然后分析出上層網絡協議的類型
*/
ethernet_type=ntohs(ethernet_protocol->ether_type);
printf("Ethernet type is :%04x\t",ethernet_type);
switch(ethernet_type)
{
case 0x0800:printf("The network layer is IP protocol\n");break;//ip
case 0x0806:printf("The network layer is ARP protocol\n");break;//arp
case 0x0835:printf("The network layer is RARP protocol\n");break;//rarp
default:printf("The network layer unknow!\n");break;
}
pcap_close(pcap_handle);
return 0;
}
注意:gcc 編譯時需要加上 -lpcap,運行時需要使用超級權限
例子2(接收多個數據包):
#include <stdio.h>
#include <pcap.h>
#include <arpa/inet.h>
#include <time.h>
#include <stdlib.h>
#define BUFSIZE 1514
struct ether_header
{
unsigned char ether_dhost[6]; //目的mac
unsigned char ether_shost[6]; //源mac
unsigned short ether_type; //以太網類型
};
/*******************************回調函數************************************/
void ethernet_protocol_callback(unsigned char *argument,const struct pcap_pkthdr *packet_heaher,const unsigned char *packet_content)
{
unsigned char *mac_string; //
struct ether_header *ethernet_protocol;
unsigned short ethernet_type; //以太網類型
printf("----------------------------------------------------\n");
printf("%s\n", ctime((time_t *)&(packet_heaher->ts.tv_sec))); //轉換時間
ethernet_protocol=(struct ether_header *)packet_content;
mac_string=(unsigned char *)ethernet_protocol->ether_shost;//獲取源mac地址
printf("Mac Source Address is %02x:%02x:%02x:%02x:%02x:%02x\n",*(mac_string+0),*(mac_string+1),*(mac_string+2),*(mac_string+3),*(mac_string+4),*(mac_string+5));
mac_string=(unsigned char *)ethernet_protocol->ether_dhost;//獲取目的mac
printf("Mac Destination Address is %02x:%02x:%02x:%02x:%02x:%02x\n",*(mac_string+0),*(mac_string+1),*(mac_string+2),*(mac_string+3),*(mac_string+4),*(mac_string+5));
ethernet_type=ntohs(ethernet_protocol->ether_type);//獲得以太網的類型
printf("Ethernet type is :%04x\n",ethernet_type);
switch(ethernet_type)
{
case 0x0800:printf("The network layer is IP protocol\n");break;//ip
case 0x0806:printf("The network layer is ARP protocol\n");break;//arp
case 0x0835:printf("The network layer is RARP protocol\n");break;//rarp
default:break;
}
usleep(800*1000);
}
int main(int argc, char *argv[])
{
char error_content[100]; //出錯信息
pcap_t * pcap_handle;
unsigned char *mac_string;
unsigned short ethernet_type; //以太網類型
char *net_interface=NULL; //接口名字
struct pcap_pkthdr protocol_header;
struct ether_header *ethernet_protocol;
//獲取網絡接口
net_interface=pcap_lookupdev(error_content);
if(NULL==net_interface)
{
perror("pcap_lookupdev");
exit(-1);
}
pcap_handle=pcap_open_live(net_interface,BUFSIZE,1,0,error_content);//打開網絡接口
if(pcap_loop(pcap_handle,-1,ethernet_protocol_callback,NULL) < 0)
{
perror("pcap_loop");
}
pcap_close(pcap_handle);
return 0;
}
運行情況如下:
過濾數據包
我們抓到的數據包往往很多,如何過濾掉我們不感興趣的數據包呢?
幾乎所有的操作系統( BSD, AIX, Mac OS, Linux 等)都會在內核中提供過濾數據包的方法,主要都是基于 BSD Packet Filter( BPF ) 結構的。libpcap 利用 BPF 來過濾數據包。
1)設置過濾條件
BPF 使用一種類似于匯編語言的語法書寫過濾表達式,不過 libpcap 和 tcpdump 都把它封裝成更高級且更容易的語法了,具體可以通過 man tcpdump查看:
以下是一些例子:
src host 192.168.1.177
只接收源 ip 地址是 192.168.1.177 的數據包
dst port 80
只接收 tcp/udp 的目的端口是 80 的數據包
not tcp
只接收不使用 tcp 協議的數據包
tcp[13]==0x02 and (dst port 22 or dst port 23)
只接收 SYN 標志位置位且目標端口是 22 或 23 的數據包( tcp 首部開始的第 13 個字節)
icmp[icmptype]==icmp-echoreply or icmp[icmptype]==icmp-echo
只接收 icmp 的 ping 請求和 ping 響應的數據包
ehter dst 00:e0:09:c1:0e:82
只接收以太網 mac 地址是 00:e0:09:c1:0e:82 的數據包
ip[8]==5
只接收 ip 的 ttl=5 的數據包(ip首部開始的第8個字節)
2)編譯 BPF 過濾規則
int pcap_compile( pcap_t *p,
struct bpf_program *fp,
char *buf,
int optimize,
bpf_u_int32 mask );
功能:
編譯 BPF 過濾規則
參數:
p:pcap_open_live() 返回的 pcap_t 類型的指針
fp:存放編譯后的 bpf,應用過濾規則時需要用到這個指針
buf:過濾條件
optimize:是否需要優化過濾表達式
mask:指定本地網絡的網絡掩碼,不需要時可寫 0
返回值:
成功返回 0,失敗返回 -1
3)應用 BPF 過濾規則
int pcap_setfilter( pcap_t * p, struct bpf_program * fp );
功能:
應用 BPF 過濾規則,簡單理解為讓過濾生效
參數:
p:pcap_open_live() 返回的 pcap_t 類型的指針
fp:pcap_compile() 的第二個參數
返回值:
成功返回 0,失敗返回 -1
這個編譯應用過程,有點類似于,我們寫一個 C 程序,先編譯,后運行的過程。
應用完過濾表達式之后我們便可以使用 pcap_loop() 或 pcap_next() 等抓包函數來抓包了。
下面的程序演示了如何過濾數據包,我們只接收目的端口是 80 的數據包:
作者 | admin-root
責編 | 郭芮
出品 | CSDN博客
通過這些搜索語句你可以搜索到想要的任何東西,一條一條試總會有驚喜哦~~如果你還有其他更好的語句歡迎補充!
inurl:Login 將返回url中含有Login的網頁
intitle:后臺登錄管理員 將返回含有管理員后臺的網頁
intext:后臺登錄 將返回含有后臺的網頁
inurl:/admin/login.php 將返回含有admin后臺的網頁
inurl:/phpmyadmin/index.php 將返回含有phpmyadmin后臺的網頁
site:baidu.com inur:Login 將只在baidu.com中查找urI中含有Login的網頁
site:baidu.com filetype:pdf 將只返回baidu.com站點上文件類型為pdf的網頁
link:www.baidu.com 將返回所有包含指向www.baidu.com的網頁
related:www.llhc.edu.cn 將返回與www.llhc.edu.cn相似的頁面,相似指的是網頁的布局相似
index of /admin 發現允許目錄瀏覽的web網站
inurl:share.cgi?ssid=云服務器文件和文件夾共享
intitle:"Welcome to QNAP Turbo NAS" QNAP登錄頁面
inurl:"img/main.cgi?next_file" 在線攝像頭
ext:log inurl:"/pgadmin" 包含多媒體信息的文件,pgAdmin客戶端日志文件
"m.zippyshare.com/" 敏感目錄
"-- Account dump" ext:sql-git 使用標簽查找關于MySQL轉儲的信息
inurl:_vti_pvt/administrators.pwd 用于檢索MS FrontPage共享點的敏感信息登錄/密碼
inurl:front/central.php 包含登錄門戶的頁面
inurl:zabbix.php AND intext:"Zabbix SIA" zxbbix網絡監控系統
inurl:"/wp-admin/setup-config.php" intitle:"Setup Configuration File" 找未完成的安裝Wordpress
inurl:scgi-bin intitle:"NETGEAR ProSafe" 千兆防火墻。默認用戶名:admin。默認密碼:密碼inurl:scgi-bin
inurl:index of=%2F /admin login %2F intitle:"Administration Login - 網絡托管公司的管理員登錄
intitle:"twonky server" inurl:"9000" -intext:"9000" 查找Twonky媒體共享服務器
inurl:"sitemanager.xml" ext:xml -git 查找FileZilla站點管理器文件,其中包含FTP用戶名和密碼Dxtroyer
intitle:"Sign in · GitLab" 查找GitLab登錄頁面
inurl:"/api/index.php" intitle:UniFi 查找具有多信息的UniFi API瀏覽器,如WiFi密碼redstoner2014
inurl:"wp-content/uploads/file-manager/log.txt" WordPress插件文件管理器日志文件有趣的信息
"TX_start" "card_name" ext:log 從商店查找交易記錄,其中包含多汁的信用卡/借記卡信息
intitle:"Namenode information" AND inurl:":50070/dfshealth.html" 用于基礎設施Hadoop的NameNode存儲信息
inurl:/_layouts/mobile/view.aspx?List=包含用戶名的文件
inurl:".php?id=" "You have an error in your SQL syntax" 找到sql注入的網站
inurl:/proc/self/cwd 遭到入侵的易受攻擊的Web服務器
inurl:/remote/login?lang=en 查找FortiGate防火墻的SSL-VPN登錄門戶
intitle:"Plesk Onyx" intext:"Interface language" 查找Plesk Onyx登錄頁面
intitle:"GitBucket" intext:"Recent updated repositories" intext:"Sign In" 查找GitBucket服務器
intitle:"cuckoo sandbox" "failed_reporting" cuckoo 失敗報考
"You‘re successfully running JSON Server" 成功運行JSON服務器
index of /htdocs 用于查找未經授權的Web服務器,并通過‘htdocs‘文件夾查找所有敏感信息
inurl:login.cgi intitle:NETGEAR NETGEAR 在線查找GSS108E ProSAFE PoE +點擊開關,默認密碼password
inurl:"/ap/recuperadocumentossql.aspx" AuraPortal:內部文件
intitle:"Namenode information" 查找無密封的文件系統,等待被利用
inurl:"/ADVANCED/COMMON/TOP" 查找無密碼的愛普生打印機
filetype:ini "wordfence". 找到運行Wordfence WAF的WordPress網站
intitle:"Index of" "Apache/2.4.7 (Ubuntu) Server" 用于查找Ubuntu服務器和某個版本的Apache
"Sorting Logs:" "Please enter your password" "Powered By" -urlscan -alamy 找到stealer僵尸網絡控制面板
intitle:"Index of /" "mod_ssl 2.2.22 OpenSSL/1.0.1" 找到易受攻擊的Bug Dxtroyer的OpenSSL服務器
intitle:"Index of /" "Proudly Served by Surftown at" 查找Surftown HTTP服務器Dxtroyer
"Blocking Reason:" ext:log -git 找到安全漏洞日志Dxtroyer
inurl:"/logs/www" ext:log 查找連接日志,用戶代理,錯誤等
intitle:"Index of /" "joomla_update.php" 找到具有Joomla日志的目錄,通常包含多汁的信息
intext:uploadOverwrite || intext:OPEN || intext:cwd cwd作者
intext:DB_PASSWORD || intext:"MySQL hostname" ext:txt 允許你搜索WordPress配置
site:pastebin.com intext:"*@*.com:*" 查找pastebin.com轉儲的郵件列表,密碼TPNight
inurl:"g2_view=webdav.WebDavMount" 查找啟用WebDAV的網站TPNight
-inurl:htm -inurl:html intitle:"index of" NIKON 瀏覽尼康數碼單反相機和相機目錄中上傳和保存的圖像和照片
-inurl:htm -inurl:html intitle:"index of" 100CANON 瀏覽佳能的目錄中上傳和保存的圖像和照片
"Protocol=unreal" ext:ini -git 到虛幻游戲文件,可能包含管理員密碼
inurl:"/Windows/Cookies/"ext:txt -telecom -forbidden -git查找Windows存儲的Cookie,可能包含加密的用戶名和密碼
"[FFFTP]" ext:ini 使用FTP登錄,服務器信息等查找文件
"random‘s system information tool" ext:txt 從系統信息工具找信息
inurl:app/config/intext:parameters.yml intitle:index.of 目錄:Symfony(PHP Framework)包含
inurl:"dcwp_twitter.php?1=" 使用私人消息,加密憑證等查找Twitter API日志
intitle:"Setup Home" "Internet Status" -belkin 找到互聯網連接的Arris路由器
inurl:"ftp://www." "Index of /" 查找在線FTP服務器
intitle:"CGIWrap Error" 查找包含一些有趣信息的CGIWrap腳本錯誤
"Consola de Joomla! Debug" inurl:index.php 提供以下信息>會話>配置文件信息>內存使用>數據庫注冊表
inurl:"pubdlcnt.php?file=" ext:php 找到重定向漏洞.
"-- MySQL Administrator dump" ext:sql 找到一些不錯的數據庫轉儲,可能包含用戶名,密碼和其他
"-----BEGIN X509 CERTIFICATE-----" ext:pem -git 查找X.509服務器證書
"START securepay" ext:log 查找交易記錄(有時包含信用卡號碼和其他多汁的信息
inurl:"8080/jmx-console" 將列出所有未經身份驗證的jboss服務器與jmx-console訪問
inurl:"Login;jsessionid=" 查找通用的JS登錄門戶
inurl:"idx_config" 找到通過shell抓取配置
inurl:"exit.php?url=" -entry_id 頁面易受任意重定向
"KVP_ENCDATA:Version=1.0" ext:log 查找具有銀行帳戶信息的交易記錄
allinurl:"/wp-content/plugins/wp-noexternallinks" 找到易受XSS影響的“無外部鏈接”插件“”錯誤
"resources.db.params.password" ext:ini -git 找數據庫用戶名和密碼
intitle:"Dell SonicWALL - Authentication" 發現戴爾防火墻服務器
intitle:"webcamXP 5" -download 查找WebcamXP相機
inurl:"http://ftp.dlink" 允許我們找到D-Link路由器的FTP目錄列表
intitle:"Authorization" "TF" inurl:"admin.php" 找到一堆未受保護的僵尸網絡控制面板
inurl:"http://webmail." 查找各種網絡郵件服務器
inurl:"/siteadmin/index.php" 找到管理控制臺
ext:reg"[HKEY_CURRENT_USER\Software\ORL\WinVNC3]" -git 使用WinVNC密碼查找文件
"mysqli_connect" ext:inc 查找包含MySQL用戶名和密碼的腳本
"MiniToolBox by Farbar" ext:txt 查找具有IP配置,DNS信息,應用程序錯誤等的日志!
"WEB Browser Password Recovery" ext:txt WEB瀏覽器密碼重置
"Operating System Intel Recovery" ext:txt 操作系統英特爾恢復
"iSpy Keylogger" "Passwords Log" ext:txt iSpy Keylogger日志密碼
ext:php intext:"-rwxr-xr-x" site:.in 受影響的軟件
inurl:core.windows.net ext:xlsx 可以更改文件擴展名或運行沒有擴展名
"-- MySQL dump" ext:sql -git 查找MySQL數據庫轉儲,用戶名,密碼
inurl:/helpdesk/staff/index.php? 找到“Kayako軟件票務門戶登錄頁面”
inurl:/_catalogs 識別sharepoint服務器
inurl:/pub/ inurl:_ri_ 使用Oracle Responsys的服務器*
inurl:"/data/urllist.txt" ext:txt -git 文網站地圖,其中包含robots.txt
"Log in" "Magento is a trademark of Magento Inc." 查找Magento管理登錄
intitle:index of intext:@WanaDecryptor@.exe Wannacry Ransonware感染的服務器
" End Stealer " ext:txt 333從“Black Stealer” 中查找日志,這是一個互聯網密碼
"--- WebView Livescope Http Server Error ---" -git WebView服務器錯誤,主要發現在舊服務器
intitle:index of intext:wncry 找到受Wannacry Ransomware影響的服務器
inurl:"/view/view.shtml?id=" 查找Axis IP攝像機
intitle:"Welcome to ZyXEL" -zyxel.com 查找ZyXEL路由器,IP攝像機和其他設備
"FileZilla" inurl:"recentservers.xml" -git 查找FileZilla最新的服務器文件,帶有純文本用戶名/密碼
"SECRET//NOFORN" ext:pdf 找到秘密政府文件
"PHP Fatal error: require" ext:log 找到PHP錯誤日志
inurl:"go.cgi?url=" 找到可以利用來重定向 可以將其用于網絡釣魚
(site:onion.link | site:onion.cab | site:tor2web.org | site:onion.sh | site:tor2web.fi | site:onion.direct) 查找托管在Tor網絡托管的網站
inurl:"http://voicemail." 各種語音郵件服務器
"Stealer by W33DY" ext:txt 找到具有用戶名,密碼和網站
inurl:"this.LCDispatcher?nav=" 查找連接到互聯網Dxtroyer的HP打印機
inurl:"multimon.cgi" intitle:"UPS" 找到現場交通顯示器
inurl:"member.php?action=login" 查找由MyBB 登錄頁面
"Section" inurl:"xorg.conf" ext:conf -wiki Xorg X的配置文件,包含受害者的計算機信息
inurl:"lvappl.htm" 找到連接到互聯網服務器(主要是安全攝像頭
intitle:index of AND (intext:mirai.x86 OR intext:mirai.mips OR intext:mirai.mpsl OR
intext:mirai.arm OR intext:mirai.arm7 OR intext:mirai.ppc OR intext:mirai.spc OR intext:mirai.m68k OR intext:mirai.sh4) 查找感染服務器
inurl:"/zebra.conf" ext:conf -git 查找GNU Zebra登錄憑據
"screen mode id:" ext:rdp RDP基本上是Windows認證的后門
inurl:"/Windows/Cookies/" ext:txt -git 所有種類的網站的Cookie
inurl:"/drive/folders/" site:drive.google.com Google云端硬盤文件夾
inurl:"/fmi/webd" 登錄另一個文件云文件夾
"HTTP" inurl:"access.log" ext:log 查找包含有關網站活動信息的日志
inurl:"folderview?id=" site:drive.google.com 查找人員的私人文件夾
"Index of" inurl:"/$Recycle.Bin/" Windows回收箱
inurl:"Makefile.in" ext:in 使用私有服務器信息查找配置文件
inurl:/j_security_check;jsessionid=可以訪問很多登錄頁面
intext:VIEWS · Server: - Database: information_schema - Table: SCHEMA_PRIVILEGES · Browse · Structure · SQL · Search · Export 訪問網站phpmyadmin的web服務器
"[dirs]" inurl:"mirc.ini" -git 查找mIRC配置文件
ext:fetchmailrc 查找.fetchmailrc文件與電子郵件登錄信息
"[main]" "enc_GroupPwd=" ext:txt 找到Cisco VPN客戶端密碼
"InnoDB:" ext:log 找到MySQL錯誤日志
"-----BEGIN RSA PRIVATE KEY-----" ext:key ### 一些哈希(密碼,證書等
"Scan result of Farbar Recovery Scan Tool" ext:txt Farbar恢復掃描工具掃描結果
" AdwCleaner" ext:txt 查找AdwCleaner logfiles
"/wp-admin/admin-ajax" ext:txt 查找robots.txt文件,其中提供有關服務器更敏感方面的信息
"WHMCS Auto Xploiter" 發現WHMCS在站點Dxtroyer中利用shellz
powered by h5ai 由h5ai提供*您可以瀏覽文件
"[PHPSESSID]" ext:log 查找由PHP Dxtroyer生成的會話ID的日志
"Access Denied" "Powered by Incapsula" ext:php 查找觸發了Incapsula WAF Dxtroyer的易受攻擊的頁面
"authentication failure; logname=" ext:log 查找失敗登錄的日志文件,其中包含用戶名和登錄路徑
filetype:bak inurl:php "mysql_connect" 包含MySQL數據庫密碼的PHP備份
inurl:"/load.cgi" ext:cgi 查找更多頁面易受重定向的
"Logfile of Trend Micro HijackThis" ext:log 趨勢微劫持的日志文件
"LGD_CARDNUM" ext:log -site:camper.com 查找部分信用卡號,銀行帳戶信息
inurl:"/HtmlAdaptor?action="
"[boot loader]" "WINNT" ext:ini 查找boot.ini文件,顯示在服務器
inurl:"mail" ext:mai 發送的私人電子郵件
"%@" ext:ascx 查找ASP配置和設置
intitle:"Nessus Scan Report" ext:html 查找Nessus(漏洞掃描程序
"SERVER_ADDR" "SERVER_PORT" "SERVER_NAME" ext:log 查找具有服務器信息的日志
inurl:"exit.php?site=" 查找允許您將用戶重定向到任何網站的文件
inurl:"/SecureAuth1" SecureAuth登錄,密碼重置i
inurl:"/admin.php?cont=" 找到Radius Manager登錄頁面
" -FrontPage-" ext:pwd 查找MS Frontpage密碼
inurl:"/sitemap.xsd" ext:xsd 找到導致站點地圖的文件...有用于查找登錄門戶和內容
inurl:"/fb_ca_chain_bundle.crt" ext:crt 查找Facebook留下的安全證書,可能有一些有用的信息
"El Moujahidin Bypass Shell" ext:php 簡單上傳
" This file was generated by libcurl! Edit at your own risk." ext:txt cookie數據,有時包含易受攻擊的信息
"END_FILE" inurl:"/password.log" 查找用戶特定的登錄信息
-english -help -printing -companies -archive -wizard -pastebin -adult -keywords "Warning: this page requires Javascript. To correctly view, please enable it in your browser" 用于fortinet防火墻登錄網絡的
"INSERT INTO phpbb_users" ext:sql 查找具有用戶名和散列密碼的文件
"havij report" "Target" ext:html 顯示havij sqli注射報告
inurl:"/admin/index.php?msg=" inurl:"%20" 找到可以XSS‘d和編輯的頁面
intitle:"Priv8 Mailer Inbox 2015" ext:php 只是另一個郵件:P請不要使用垃圾郵件
inurl:"-wp13.txt" 找到MySQL,ABSPATH,Wordpress等配置文件
intext:Table structure for table `wp_users` filetype:sql 網站數據庫轉儲信息
"Joomla! Administration Login" inurl:"/index.php" 查找Joomla管理員登錄頁面
"Index of" "logins.json" "key3.db" 查找包含保存的Firefox密碼,瀏覽歷史記錄等
"Greenstone receptionist" inurl:"/etc/main.cfg" 查找Web應用程序配置
"PGP SIGNED MESSAGE-----" inurl:"md5sums" FINDs(MD5,SHA1等
inurl:"/phpinfo.php" "PHP Version" 找到phpinfo頁面
inurl:".php?cat=" inurl:"‘" 查找易受SQL注入攻擊的站點
"Fatal NI connect error" ", connecting to:" ext:log 找到不同應用程序日志的全部負載
inurl:"/attachment/" ext:log 查找具有LOTS信息的Web應用程序日志
"Below is a rendering of the page up to the first error." ext:xml 錯誤信息
inurl:"/irclogs/" ext:log 找到IRC日志
( ext:php ) ( inurl:/wp-content/uploads/AAPL/loaders/ ) 找到網絡shell
filetype:pcmcfg 搜索pulseway應用程序
inurl:cgi-bin/lsnodes_web?node 在線無線電狀態節點
inurl:/profile.php?lookup=1 網站和論壇的管理員名稱
"your default password is" filetype:pdf 初始密碼
inurl:".Admin;-aspx }" "~Login" 管理員登錄-Xploit
inurl:?filesrc=**** ~"Current" ~"asp" 不同的上傳的shell名稱
ext:svc inurl:wsdl Web服務描述語言
inurl:".reset;-.pwd }" "~ User" 門戶登錄存儲用戶信息
"CF-Host-Origin-IP" "CF-Int-Brand-ID" "CF-RAY" "CF-Visitor" "github" -site:github.com -site:cloudfare.com cloudfare.com替換“github.com
httrack inurl:hts-log.txt ext:txt -github.com httrack網站復制日志的數據
inurl:sendmessage.php?type=skype 反映XSS易受攻擊的
site:onedrive.live.com shared by 識別共享存檔
intitle:"Login - OpenStack Dashboard" inurl:"dashboard" 登錄 - OpenStack儀表板登錄
inurl:"/graphs" intext:"Traffic and system resource graphing" 查看mikrotik圖形界面inurl的結果
intitle:"FormAssembly Enterprise :" 包含表單組織用于收集信息。有些敏感
inurl:forgot.do;jsessionid=忘記密碼門戶
site:cloudshark.org/captures password 包含密碼的PCAP捕獲
inurl:/o/oauth2 inurl:client_id 搜索這個將返回與OAuth2協議中的認證過程一起使用的各種客戶端ID
intitle:Login "Login to pfSense" "Password" "LLC" pfSense防火墻管理登錄頁面
inurl:iProber2.php ext:php 類別:包含多媒體信息的文件漏洞作者
inurl:/\filesrc=**** ~"Current" ~":/" ~"upload" 網站上涵蓋的大量外殼后門鼠標列表
inurl:~/ftp://193 filetype:(php | txt | html | asp | xml | cnf | sh) ~‘/html‘ 通過IP地址查找FTP服務器列表
inurl:/index.php?option=com_artforms 組件SQL注入
"dirLIST - PHP Directory Lister" "Banned files: php | php3 | php4 | php5 | htaccess | htpasswd | asp | aspx" "index of" ext:php 禁止文件
intitle:"index of/" CCCam.cfg 配置文件包含CCCam服務器的用戶和密碼
inurl:cgi-bin "ARRIS Enterprises" 面板ARRIS路由器
inurl:"/viewlsts.aspx?BaseType="
"Powered by AutoIndex PHP Script" ext:php 敏感目錄和文件包含多媒體信息
inurl:action=php.login 你可以找到不同的管理頁面
"All site content" ext:aspx Sharepoint管理網
inurl:admin inurl:uploads 從上傳網站捕獲圖像和文字
inurl:/fckeditor/editor/plugins/ajaxfilemanager/ajaxfilemanager.php 敏感目錄
inurl:github.com intitle:config intext:"/msg nickserv identify" 原始密碼
inurl:"/html/modeminfo.asp? NetGear路由器信息
intitle:"Log In to AR Web" 華為AR路由器登錄面板
inurl:user_guide intext:"CodeIgniter User Guide" 離線用戶指南
allinurl: drive.google.com/open?id=文件和用戶共享谷歌驅動器的數據
site:webex.com inurl:tc3000 訪問一些會議信息
inurl:"/debug/default" intitle:"Yii Debugger" Yii調試器PHP框架服務器信息
inurl:proftpdpasswd proftpd密碼
inurl:/mjpg/video.mjpg 在線設備
intitle:"Vigor Login Page" Vigor路由器登錄面板
Meg4-Mail ext:php PHP郵箱
intitle:"Integrated Dell Remote Access Controller 6 - Enterprise" 戴爾遠程訪問控制器
Hostinger ? 2016. All rights reserved inurl:default.php Hostinger虛擬主機客戶端默認公開頁面,敏感目錄列表
"PHP Credits" "Configuration" "PHP Core" ext:php inurl:info info另一種查看Phpinfo的方式
inurl:".esy.es/default.php" public_html文件夾中的文件列表
"PHP Mailer" "priv8 Mailer" ext:php
intitle:"SonicWALL - Authentication" SonicWALL防火墻登錄門戶
intitle:"Login" inurl:"/doc/page/login.asp" HikVision網絡攝像頭的界面
inurl:/php/info.php Web服務器檢測
"PHP eMailer is created by" ext:php
intitle:Leaf PHP Mailer by [leafmailer.pw] ext:php
"File Manager Version 1.0" "Coded By" 文件管理器
inurl:ManageFilters.jspa?filterView=popular 提供熱門的JIRA問題主題
intext:SOAP 1.1 intext:SOAP 1.2 intext:UPLOAD intext:GET intext:POST inurl:op 識別易受攻擊的網站
https://paper.dropbox.com inurl:/doc/
intitle:"HFS" "Server Uptime" "Server time" Web服務器檢測
inurl:"apc.php" intitle:"APC INFO"
"PHP Version" inurl:/php/phpinfo.php 關PHP安裝的信息的頁面
"Upload" inurl:"https://webfiles" 發現頁面易受目錄遍歷,上傳和下載文件的影響
inurl:"-/monitoring" "statistics of JavaMelody" 監控JavaEE應用程序。允許可視化sql請求
"[HKEY_CURRENT_USER\Software\sota\FFFTP]" filetype:reg Windows服務器的多媒體信息的文件
inurl:calendar.google.com/calendar/embed?src=公開的Google日歷
(@gmail.com || @yahoo.com || @hotmail.com) ext:php inurl:compose mail郵件服務器的郵件帳戶名和其他數據
intitle:"open webif" "Linux set-top-box" 允許完全控制Dreambox TV機頂盒的Web界面
inurl:/mjpgmain.asp 名稱=Y-cam的實時視圖
inurl:/web/device/login?lang=1 h3c web管理登錄頁面
intitle:"StrongLoop API Explorer" intext:"Token Not Set" 尋找開放的Strongloop的環回API資源管理器
"This WebUI administration tool requires scripting support" intitle:‘Login‘ intext:‘Admin Name:‘ -score Juniper Netscreen WebUI登錄頁面
inurl:"https://vdi" Horizo??n登錄頁面
index:"html/js/editor/fckeditor/editor/filemanager/connectors" 敏感目錄
inurl:/?skipANDROID=true intext:"Pydio Community" Pydio社區,云和安全的FTP服務器登錄
inurl:"html/js/editor/ckeditor/" 敏感目錄入口
"generated by Munin" inurl:index -intext:index localhost Munin網絡小組
"You have selected the following files for upload (0 Files)." 查找文件上傳頁面
inurl:/human.aspx?r=安全的ftp服務器登錄
inurl:"/wp-content/wpclone-temp/wpclone_backup/" 備份目錄包含WordPress用戶名和密碼
inurl:"/sgdadmin/" Secure Global Desktop Oracle Secure Global桌面控制臺和管理員幫助
intitle:"nstview v2.1:: nst.void.ru" | intext:"nsTView v2.1 :: nst.void.ru. Password: Host:"
filetype:php intext:Your Email: intext:Your Name: intext:Reply-To: intext:mailer 郵箱用戶名修改頁面
inurl:log -intext:log ext:log inurl:wp- 從wordpress網站上獲取日志
inurl:ipf.conf -intext:ipf.conf ext:conf Solaris系統防火墻
inurl:wp-content/debug.log 啟用調試日志的一些操作...
intitle:Sign In inurl:/adfs/ls/?wa=wsignin1.0 用戶登錄頁面
(inurl:"8080/monitorix" & intext:"Hostname") | inurl:"8080/monitorix-cgi" Monitorix系統監控工具web界面
inurl:"/login/login.html" intitle:"Greenbone Security Assistant" OpenVAS登錄頁面
inurl:"/weathermap/weathermap-cacti-plugin.php" 通過Weathermap Cacti插件映射IT基礎設施
intext:"Web Application Report" intext:"This report was created by IBM Security AppScan" ext:pdf 搜索IBMAppScan漏洞報告
"Web Application Assessment Report" ext:pdf 搜索HP WebInspect掃描報告
inurl:index of driver.php?id=發現操作系統警告
intitle:"bandwidthd" "programmed by david hinkle, commissioned by derbytech wireless networking." BandwidthD搜索報告
inurl:/Portal/Portal.mwsl 這是西門子S7系列PLC控制器的代號
inurl:/FCKeditor/editor/filemanager/upload/ 受保護的文件進行身份驗證。
inurl:Dialin/Conference.aspx 登錄門戶的頁面
inurl:pictures intitle:index.of 負載的個人圖片
inurl:sgms/auth 找到Sonicwall GMS服務器
site:static.ow.ly/docs/ intext:@gmail.com | Password 緩存中的密碼的文檔
inurl:DiGIR.php fnkym0nky描述
intext:"Dumping data for table `orders`" 個人信息的SQL轉儲文件
filetype:sql intext:wp_users phpmyadmin wp漏洞報告
"index of" bigdump.php 交錯的MySQL轉儲進口商文件
"Index of /wp-content/uploads/backupbuddy_backups" zip 搜索iThemes BackupBuddy備份拉鏈
intext:"/showme.asp" HTTP_ACCEPT HTTP_ACCEPT服務器的應用程序和會話內容
intext:"/LM/W3SVC/" ext:asp 提供信息的asp ServerVariables
inurl:top.htm inurl:currenttime 在線相機
intext:"Hello visitor from" ext:asp
intext:"expects parameter 1 to be resource, boolean given" filetype:php 易受攻擊的基于mysql的網站
inurl:/awcuser/cgi-bin/ Mitel系統
site:github.com ext:csv userid | username | user -example password 用戶 示例密碼誘餌
inurl:"/wp-content/uploads/levoslideshow/" Webshel??l上傳
Zixmail inurl:/s/login? Zixmail安全電子郵件登錄門戶
inurl:"/wp-content/plugins/wp-mobile-detector/" ext:php Detector 3.5遠程Shell上傳
inurl:trash intitle:index.of 敏感目錄
inurl:.ssh intitle:index.of authorized_keys SSH密鑰
inurl:/remote/login/ intext:"please login"|intext:"FortiToken clock drift detected" 錄門戶的頁面
intitle:"Hamdida X_Shell Backd00r" 后門
inurl:/WebInterface/login.html CrushFTP的登錄頁面可能會彈出其他程序的FTP頁面
intext:"Powered by BOMGAR" BOMGAR在線設備
intext:"Forum software by XenForo?" 論壇軟件”XenForo SQLi漏洞
ext:php inurl:"api.php?action=" SQLi漏洞
inurl:"/webmail/" intitle:"Mail - AfterLogic WebMail" -site:afterlogic.org -site:afterlogic.com WebMail XXE注入漏洞
filetype:txt "gmail" | "hotmail" | "yahoo" -robots site:gov | site:us 電子郵件
inurl:citrix inurl:login.asp -site:citrix.com Citrix登錄門戶網站
inurl:vidyo -site:vidyo.com inurl:portal Vidyo門戶
intitle:"MODX CMF Manager Login" 搜索MODX登錄門戶
"Fenix Final Version v2.0" filetype:php Web-Shell新的
inurl:demo.browse.php intitle:getid3 getID3演示可以允許目錄遍歷,刪除文件等
inurl:/sites/default/files/webform/ Drupal默認的Web表單的存儲路徑
intext:"eav" filetype:txt NOD32防病毒帳戶的用戶名和密碼的文件
intitle:"Struts Problem Report" intext:"development mode is enabled." Struts問題報告
index of /wp-content/uploads/userpro csv文件發現有很多個人信息
inurl:"/owncloud/public.php" -github -forum 共享文件Owncloud
inurl:"/eyeos/index.php" -github -forum 登錄門戶的頁面
inurl:"/owncloud/index.php" -github -forum owncloud門戶頁面
inurl:configfile.cgi configfile.cgi D0bby
filetype:pwd intitle:index 登錄門戶的頁面
site:github.com filetype:md | filetype:js | filetype:txt "xoxp-" 松散認證令牌
/@fmb80_encoder.htm 聲音技術在廣播fm
filetype:pdf intitle:"SSL Report" SSL報告主機
intitle:"Skipfish . scan" Skipfish
filetype:pcf "cisco" "GroupPwd" 具有組密碼的Cisco VPN文件進行遠程訪問
filetype:rcf inurl:vpn VPN客戶端文件包含敏感信息和登錄
intitle:Index of /__MACOSX ... 父目錄Wordpress信息
inurl:dynamic.php?page=mailbox Webmail登錄頁面
inurl:inmotionhosting.com:2096/ Webmail登錄頁面
site:pastebin.com intext:@gmail.com | @yahoo.com | @hotmail.com daterange:2457388-2457491 包含電子郵件和相關密碼列表的文件
inurl:userRpm inurl:LoginRpm.htm 列出所有TPLink路由器
inurl:https://pma. 登錄門戶
inurl:/dynamic/login-simple.html? 訪問linksys智能WiFi帳戶
inurl:/Remote/logon?ReturnUrl /遠程/登錄ReturnUrl易受攻擊的Windows服務
inurl:index.php?app=main intitle:sms 登錄門戶到播放器webapp默認密碼admin:admin
inurl:/view/viewer_index.shtml
聲明:本文為CSDN博主「admin-root」的原創文章,原文鏈接:https://blog.csdn.net/weixin_45728976/article/details/104439087