RPCAP
RPCAP
0]
proto_abbr=RPCAP
proto_full=Remote Packet Capture
layer=APPLICATION
color=#0x66669A
auther=xin.he
tester=tao.li
description_en=RPCAP is a remote packet capture system, enabling users to run
remote packet capture program on the target computer
description_zh=RPCAP 是一个远程抓包系统,使用户能够在目标计算机上运行远程抓包程序
#remarks:
#1.根据 wireshark 源码解码.
#2.数据包长度必须大于 8 个字节
#3.版本必须为 0
#4.UDP 之上只可能为 rpcap 的 msg_type=7 类型数据
#5.msg_type=11,131,132 时,Payload length 必须为 8
#6.msg_type=137 时,Payload length 必须为 16
#7.msg_type=7 时,Payload length 必须大于等于 20
#8.msg_type=4 或者 5 时,Opcode 的标志位根据本身的值有不同的含义.这里不做判断.
#9.测试添加 TCP 识别端口:1921-2002
[struct]
structfield Promiscuousmode = Flags[1:7,1],int;
structfield UseDatagram = Flags[1:6,1],int;
structfield Serveropen = Flags[1:5,1],int;
structfield Inbound = Flags[1:4,1],int;
structfield Outbound = Flags[1:3,1],int;
groupfield FilterbpfINSN;
groupfield Filter;
groupfield Flags;
groupfield Interface;
groupfield Interfaceaddress;
groupfield Address;
groupfield Netmask;
groupfield Broadcast;
groupfield P2Pdestinationaddress;
groupfield StartcapReq;
groupfield Packet;
groupfield Authentcation;
groupfield Samplings;
groupfield Findalldevices;
groupfield Openreply;
groupfield Startcapturereply;
groupfield Statistics;
groupfield Opcodes;
int AuthentcationDataLen = Payloadlength - 8;
int InformationdataLen = Payloadlength - 8 - AIL1 - AIL2;
int StartCRDLen = Payloadlength - 20 - Numberofitems * 8;
struct Messagetype 1;
struct Messagevalue 2;
struct Payloadlength 4;
struct Errorvalue 2;
struct Arrivaltime 8;
struct Capturelength 4;
struct Framelength 4;
struct Framenumber 4;
struct ErrorData Payloadlength;
struct OpenRequest Payloadlength;
struct Snaplength 4;
struct Readtimeout 4;
struct Flags 2;
struct ClientPort 2;
struct Filtertype 2;
struct Dummy 2;
struct Numberofitems 4;
struct JT 1;
struct JF 1;
struct Instructionvalue 4;
struct Framedata Framelength;
struct AuthentcationData AuthentcationDataLen;
struct Authenticationtype 2;
struct AIL1 2;
struct AIL2 2;
struct Username AIL1;
struct Password AIL2;
struct Informationdata InformationdataLen;
struct Method 1;
struct Dummy1 1;
struct Dummy2 2;
struct Value 4;
struct Namelength 2;
struct Descriptionlength 2;
struct Interfaceflags 4;
struct Numberofaddresses 2;
struct Name Namelength;
struct Description Descriptionlength;
struct Addressfamily 2;
struct Port 2;
struct IPaddress 4;
struct Padding 120;
struct Unknownaddress 126;
struct Linktype 4;
struct Timezoneoffset 4;
struct Buffersize 4;
struct Serverport 2;
struct RBKF 4;
struct DBNI 4;
struct DBKF 4;
struct CBR 4;
struct StartcapReqData StartCRDLen;
struct Opcode2_3 2;