CN108632249A - A kind of codec for VoIP exploitation debugging unpacks implementation method and device - Google Patents
A kind of codec for VoIP exploitation debugging unpacks implementation method and device Download PDFInfo
- Publication number
- CN108632249A CN108632249A CN201810253696.7A CN201810253696A CN108632249A CN 108632249 A CN108632249 A CN 108632249A CN 201810253696 A CN201810253696 A CN 201810253696A CN 108632249 A CN108632249 A CN 108632249A
- Authority
- CN
- China
- Prior art keywords
- codec
- input information
- modules
- unpacks
- packets
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/10—Architectures or entities
- H04L65/1059—End-user terminal functionalities specially adapted for real-time communication
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L63/00—Network architectures or network communication protocols for network security
- H04L63/04—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks
- H04L63/0428—Network architectures or network communication protocols for network security for providing a confidential data exchange among entities communicating through data packet networks wherein the data content is protected, e.g. by encrypting or encapsulating the payload
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L65/00—Network arrangements, protocols or services for supporting real-time applications in data packet communication
- H04L65/60—Network streaming of media packets
- H04L65/65—Network streaming protocols, e.g. real-time transport protocol [RTP] or real-time control protocol [RTCP]
Landscapes
- Engineering & Computer Science (AREA)
- Multimedia (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Computer Hardware Design (AREA)
- Computing Systems (AREA)
- General Engineering & Computer Science (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
- Telephonic Communication Services (AREA)
Abstract
A kind of codec for VoIP exploitation debugging of the present invention unpacks implementation method and device, wherein, it includes pcap document analysis module, codec decoder modules, SRTP deciphering modules that codec, which unpacks realization device, wherein, pcap parsing modules, bed-by-bed analysis is carried out for reading pcap files, and to pcap files, obtains and unpacks input information;SRTP deciphering modules, for RTP packets to be decrypted according to the encryption key unpacked in input information;Codec decoder modules generate wav files for being decoded to different types of codec.The present invention, can be according to the corresponding codec modules of codec information searchings unpacked in input information when carrying out codec decodings, and different types of codec corresponds to different codec modules, to realize the parsing of multiple voice codec.
Description
Technical field
The present invention relates to VoIP phones fields, and in particular to a kind of codec of VoIP exploitation debugging unpack implementation method and
Device.
Background technology
The investigation of the problem of in VoIP exploitation debugging to sound, is most intuitively that can directly hear sound.But it is opening
In hair, the data packet in call can only be often caught, and data packet is by coding, some, which also has, encrypts.This to exploitation and
It is one very big problem for test, can not judges sound quality at that time.
Currently, generally the packet caught is parsed by wireshark, but it can only parse PCMU, PCMA etc. simply
codec.And voice communication at present is much more than these codec.In addition, many packet capturing files are by encrypted, and it is existing
Wireshark be also that cannot achieve decryption to this.
Invention content
The purpose of the present invention is to provide a kind of codec for VoIP exploitation debugging to unpack implementation method and device,
Multiple voice codec can be parsed.
To achieve the above object, the technical solution adopted by the present invention is:
A kind of codec for VoIP exploitation debugging unpacks implementation method comprising following steps:
Step 1, crawl pcap files are simultaneously parsed, and to obtain SDP packets, if SDP packets obtain successfully, enter step 2, if obtaining
SDP packets fail, and enter step 3;
Step 2 obtains unpacking input information from SDP packets, and judges whether unpacking input information is complete, if unpacking input information
Completely, 4 are entered step;If it is imperfect to unpack input information, the unpacking input information of missing is obtained from log files, with complete
Whole unpacking input information, and enter step 4;
It unpacks input information to include the IP address of call ends, port, codec information, whether encrypt, if when encryption, unpacking defeated
It further includes encryption key to enter information;
Step 3, the packet header fetching portion unpacking input information by identifying RTP packets, then according to acquisition missing in log files
Input information is unpacked, completely to unpack input information, subsequently into step 4;
Step 4, when unpack input information it is complete when, according to unpack input information judge whether RTP packets are encrypted, if RTP packets do not have
Encryption, enters step 5;If RTP is surrounded by encryption, RTP packets are decrypted according to the encryption key unpacked in input information, are solved
5 are entered step after the completion of close;
Step 5, according to unpack input information in the corresponding codec modules of codec information searchings, using the codec modules into
Row codec decodings, generate playable wav files.
The present invention also provides another technical solutions:
It is a kind of for VoIP exploitation debugging codec unpack realization device comprising pcap parsing modules, SRTP deciphering modules and
Codec decoder modules,
The pcap parsing modules carry out bed-by-bed analysis for reading pcap files, and to pcap files, obtain SDP packets, be used for
It obtains and unpacks input information;If obtaining the failure of SDP packets, by identifying that the packet header fetching portion of RTP packets unpacks input information, and
The unpacking input information of missing is obtained in conjunction with log files;
The SRTP deciphering modules, for RTP packets to be decrypted according to the encryption key unpacked in input information;
The codec decoder modules are equipped with two or more codec modules;For being believed according to the codec unpacked in input information
Breath searches corresponding codec modules in codec decoder modules, and carries out codec decodings using the codec modules, generates wav texts
Part.
After adopting the above scheme, the present invention can believe when carrying out codec decodings according to the codec unpacked in input information
Breath searches corresponding codec modules, and different types of codec corresponds to different codec modules, to realize multiple voice
The parsing of codec.And it is flexible and convenient according to setting, it is easy to add newly-increased codec modules in use.In addition, this hair
It is bright that developer's fast resolving can be facilitated to go out pcap packets;In the case of for technical support, no scene, grabbing for phone is utilized
APMB package(Pcap files)With log files, call scene can be reproduced.
Description of the drawings
Fig. 1 is structure of the invention block diagram;
Fig. 2 is flow chart of the present invention.
Specific implementation mode
Fig. 1 is the structure diagram that the codec of the invention for VoIP exploitation debugging unpacks realization assembling device, as shown in Figure 1,
It includes that pcap parsing modules, SRTP deciphering modules and codec decode mould that codec for VoIP exploitation debugging, which unpacks realization device,
Block.
Wherein, pcap parsing modules carry out bed-by-bed analysis for reading pcap files, and to pcap files, obtain SDP
Packet unpacks input information for obtaining;If obtaining the failure of SDP packets, by identifying that the packet header fetching portion of RTP packets unpacks input
Information, and obtain the unpacking input information of missing in conjunction with log files.
Wherein, RTP packets are obtained by parsing pcap file identifications, and RTP packets are identified especially by following flows:
According to the format of network packet, successively recognise that for ethernet frame, whether be IP packets, whether be UDP packets;
Whether UDP loaded lengths are more than 12 bytes;
Whether UDP load the first two bit is 0x10, i.e. whether RTP version number is 2;
Whether rtp streaming loadtype does not change;
Whether the sequence number of rtp streaming are incremented by;
Whether the SSRC values of RTP packets are definite value.
SRTP deciphering modules, for RTP packets to be decrypted according to the encryption key unpacked in input information.
Codec decoder modules are equipped with two or more codec modules;For being believed according to the codec unpacked in input information
Breath searches corresponding codec modules in codec decoder modules, and carries out codec decodings using the codec modules, generates wav texts
Part.
Fig. 2 is the flow chart that the present invention unpacks implementation method for the codec of VoIP exploitation debugging, as shown in Fig. 2, being used for
The flow chart that the codec of VoIP exploitation debugging unpacks implementation method specifically includes following steps:
Step 1, crawl pcap files are simultaneously parsed, and to obtain SDP packets, if SDP packets obtain successfully, enter step 2, if obtaining
SDP packets fail, and enter step 3.
Step 2 obtains unpacking input information from SDP packets, and judges whether unpacking input information is complete, if unpacking input
Information completely enters step 4;If it is imperfect to unpack input information, the unpacking input information of missing is obtained from log files,
Completely to unpack input information, and enter step 4.
Wherein, it unpacks input information to include the IP address of call ends, port, codec information, whether encrypt, if encryption
When, it further includes encryption key to unpack input information;Codec information includes codec titles, payload type(Loadtype)、
Sample rate, bit rate and Ptime(Media packaging time length).
Step 3, the packet header fetching portion unpacking input information by identifying RTP packets, it is then scarce according to being obtained in log files
The unpacking input information of mistake, completely to unpack input information, subsequently into step 4.
Step 4, when unpack input information it is complete when, according to unpack input information judge whether RTP packets are encrypted, if RTP packets
It does not encrypt, enters step 5;If RTP is surrounded by encryption, RTP packets are solved according to the encryption key unpacked in input information
It is close, enter step 5 after the completion of decryption.
Step 5, according to unpack input information in the corresponding codec modules of codec information searchings, utilize the codec moulds
Block carries out codec decodings, generates playable wav files.
The present invention's it is critical that the present invention is when carrying out codec decodings, and meeting is according to the codec unpacked in input information
The corresponding codec modules of information searching, different types of codec corresponds to different codec modules, to realize multiple voice
The parsing of codec.And it is flexible and convenient according to setting, it is easy to add newly-increased codec modules in use.In addition, this hair
It is bright that developer's fast resolving can be facilitated to go out pcap packets;In the case of for technical support, no scene, grabbing for phone is utilized
APMB package(Pcap files)With log files, call scene can be reproduced.
The above is only the embodiment of the present invention, is not intended to limit the scope of the present invention, therefore every
According to the technical essence of the invention to any subtle modifications, equivalent variations and modifications made by above example, this is still fallen within
In the range of inventive technique scheme.
Claims (2)
1. a kind of codec for VoIP exploitation debugging unpacks implementation method, it is characterised in that:The method includes following steps
Suddenly:
Step 1, crawl pcap files are simultaneously parsed, and to obtain SDP packets, if SDP packets obtain successfully, enter step 2, if obtaining
SDP packets fail, and enter step 3;
Step 2 obtains unpacking input information from SDP packets, and judges whether unpacking input information is complete, if unpacking input information
Completely, 4 are entered step;If it is imperfect to unpack input information, the unpacking input information of missing is obtained from log files, with complete
Whole unpacking input information, and enter step 4;
It unpacks input information to include the IP address of call ends, port, codec information, whether encrypt, if when encryption, unpacking defeated
It further includes encryption key to enter information;
Step 3, the packet header fetching portion unpacking input information by identifying RTP packets, then according to acquisition missing in log files
Input information is unpacked, completely to unpack input information, subsequently into step 4;
Step 4, when unpack input information it is complete when, according to unpack input information judge whether RTP packets are encrypted, if RTP packets do not have
Encryption, enters step 5;If RTP is surrounded by encryption, RTP packets are decrypted according to the encryption key unpacked in input information, are solved
5 are entered step after the completion of close;
Step 5, according to unpack input information in the corresponding codec modules of codec information searchings, using the codec modules into
Row codec decodings, generate playable wav files.
2. a kind of codec for VoIP exploitation debugging unpacks realization device, it is characterised in that:It include pcap parsing modules,
SRTP deciphering modules and codec decoder modules,
The pcap parsing modules carry out bed-by-bed analysis for reading pcap files, and to pcap files, obtain SDP packets, be used for
It obtains and unpacks input information;If obtaining the failure of SDP packets, by identifying that the packet header fetching portion of RTP packets unpacks input information, and
The unpacking input information of missing is obtained in conjunction with log files;
The SRTP deciphering modules, for RTP packets to be decrypted according to the encryption key unpacked in input information;
The codec decoder modules are equipped with two or more codec modules;For being believed according to the codec unpacked in input information
Breath searches corresponding codec modules in codec decoder modules, and carries out codec decodings using the codec modules, generates wav texts
Part.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810253696.7A CN108632249B (en) | 2018-03-26 | 2018-03-26 | Codec unpacking implementation method and device for VoIP development and debugging |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810253696.7A CN108632249B (en) | 2018-03-26 | 2018-03-26 | Codec unpacking implementation method and device for VoIP development and debugging |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108632249A true CN108632249A (en) | 2018-10-09 |
CN108632249B CN108632249B (en) | 2020-12-08 |
Family
ID=63696325
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810253696.7A Active CN108632249B (en) | 2018-03-26 | 2018-03-26 | Codec unpacking implementation method and device for VoIP development and debugging |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108632249B (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7885396B2 (en) * | 2005-06-23 | 2011-02-08 | Cisco Technology, Inc. | Multiple simultaneously active telephone calls |
CN101247432B (en) * | 2007-07-18 | 2011-12-07 | 北京九合创胜网络科技有限公司 | VoIP voice data real-time monitoring method and device |
CN102882846A (en) * | 2012-08-17 | 2013-01-16 | 广东世纪网通信设备有限公司 | IP voice restoration method and device |
CN104813286A (en) * | 2012-12-20 | 2015-07-29 | 英特尔公司 | Method, apparatus, system for continuous automatic tuning of code regions |
CN106921609A (en) * | 2015-12-25 | 2017-07-04 | 中兴通讯股份有限公司 | Calling playback control method and device |
-
2018
- 2018-03-26 CN CN201810253696.7A patent/CN108632249B/en active Active
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7885396B2 (en) * | 2005-06-23 | 2011-02-08 | Cisco Technology, Inc. | Multiple simultaneously active telephone calls |
CN101247432B (en) * | 2007-07-18 | 2011-12-07 | 北京九合创胜网络科技有限公司 | VoIP voice data real-time monitoring method and device |
CN102882846A (en) * | 2012-08-17 | 2013-01-16 | 广东世纪网通信设备有限公司 | IP voice restoration method and device |
CN104813286A (en) * | 2012-12-20 | 2015-07-29 | 英特尔公司 | Method, apparatus, system for continuous automatic tuning of code regions |
CN106921609A (en) * | 2015-12-25 | 2017-07-04 | 中兴通讯股份有限公司 | Calling playback control method and device |
Non-Patent Citations (1)
Title |
---|
王阳: "SIP协议测试方法和测试工具的研究", 《中国优秀硕士学位论文全文数据库信息科技辑》 * |
Also Published As
Publication number | Publication date |
---|---|
CN108632249B (en) | 2020-12-08 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8547974B1 (en) | Generating communication protocol test cases based on network traffic | |
JP5167501B2 (en) | Network monitoring system and its operation method | |
US20090204812A1 (en) | Media processing | |
US9077667B2 (en) | Computing latency introduced by media transcoding operations | |
US8582465B2 (en) | System and method for facilitating network performance analysis | |
US20130185554A1 (en) | Method for analyzing coded data streams simultaneously transmitted in ip networks | |
RU2008105041A (en) | PROTECTION OF CONTENT ELEMENTARY FLOWS | |
JP2009246801A (en) | Method of encrypting divided packet, method of decrypting encrypted divided packet, encryption apparatus and program | |
US10826876B1 (en) | Obscuring network traffic characteristics | |
US8380986B2 (en) | Method for analyzing simultaneously transmitted, encoded data streams | |
EP2584744A2 (en) | Ims network, and data transmission method and device | |
US10193814B2 (en) | Method and apparatus for categorizing a download of a resource | |
US8266422B2 (en) | Network security processing method and system for selecting one of software and hardware cryptographic modules by means of multimedia session information | |
Rosen et al. | Balboa: Bobbing and weaving around network censorship | |
Uhl | QoS by VoIP under use different audio codecs | |
CN108632249A (en) | A kind of codec for VoIP exploitation debugging unpacks implementation method and device | |
CN108200071A (en) | Support message information extraction and the IPSecNAT traversing methods and system that carry | |
Dubin et al. | Video quality representation classification of Safari encrypted DASH streams | |
CN110111772B (en) | Method for identifying language used for encrypting VoIP network flow | |
WO2017084310A1 (en) | Method and device for transmitting mp4 video source | |
CN116614481A (en) | Multimedia data transmission method, device, equipment and storage medium | |
Pokharel et al. | Can Android VoIP voice conversations be decoded? I can eavesdrop on your Android VoIP communication | |
Wu et al. | Monitoring video resolution of adaptive encrypted video traffic based on HTTP/2 features | |
Fazeen et al. | Context-aware multimedia encryption in mobile platforms | |
Li et al. | A rules-based intrusion detection and prevention framework against SIP malformed messages attacks |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |