Skip to content

PcapNg - Apple Process Information Block #4396

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jun 22, 2024
Merged

Conversation

guedou
Copy link
Member

@guedou guedou commented May 22, 2024

This PR adds support for process information stored in a PcapNg by the tcpdump command on macOS.

How to test it?

sudo tcpdump -kA -r test.pcapng
>>> l = rdpcap("test.pcapng")
>>> l[0].process_information
{'proc': {'id': 2116, 'name': 'com.apple.WebKit'}, 'eproc': {'id': 2107, 'name': 'Safari'}}

@guedou
Copy link
Member Author

guedou commented May 22, 2024

I welcome comments, yet this needs to be tested against several big pcap files before being merged.

Copy link

codecov bot commented May 22, 2024

Codecov Report

Attention: Patch coverage is 73.33333% with 8 lines in your changes missing coverage. Please review.

Project coverage is 81.56%. Comparing base (de36337) to head (35cc131).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4396   +/-   ##
=======================================
  Coverage   81.56%   81.56%           
=======================================
  Files         353      353           
  Lines       84116    84145   +29     
=======================================
+ Hits        68609    68633   +24     
- Misses      15507    15512    +5     
Files Coverage Δ
scapy/packet.py 84.44% <100.00%> (+0.01%) ⬆️
scapy/utils.py 73.10% <72.41%> (-0.03%) ⬇️

... and 4 files with indirect coverage changes

@guedou guedou marked this pull request as ready for review May 22, 2024 14:10
@guedou
Copy link
Member Author

guedou commented May 23, 2024

@evverx That's a good catch! Thanks a lot for fuzzing it. This is indeed the piece of the code that I was not able to test.

@evverx
Copy link
Contributor

evverx commented May 23, 2024

Hopefully the action should help to catch things like this automatically.

It seems it still crashes. As far as I understand the condition is inverted in that UUID() is called when the length isn't 16.

@guedou guedou force-pushed the guedou/20240521/pcapng-dpeb branch from 68240ec to 49851d4 Compare May 23, 2024 15:30
@guedou guedou added this to the 2.6.0 milestone May 28, 2024
@guedou guedou force-pushed the guedou/20240521/pcapng-dpeb branch from 49851d4 to 35cc131 Compare June 17, 2024 13:55
@guedou
Copy link
Member Author

guedou commented Jun 17, 2024

This is ready to be reviewed.

@guedou guedou merged commit 06afa39 into master Jun 22, 2024
24 checks passed
@guedou guedou deleted the guedou/20240521/pcapng-dpeb branch June 22, 2024 14:24
@evverx evverx mentioned this pull request Jul 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants