{"id":22513289,"url":"https://github.com/0xamined/apa","last_synced_at":"2025-03-28T01:22:44.060Z","repository":{"id":265293200,"uuid":"895711866","full_name":"0xAminED/APA","owner":"0xAminED","description":"An advanced Packet Analyzer written in C that processes PCAP files to analyze network traffic.","archived":false,"fork":false,"pushed_at":"2024-11-28T20:20:10.000Z","size":9,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T03:18:40.410Z","etag":null,"topics":["c","c2-detection","network-analysis","network-traffic-analysis","pcap","pcap-analyzer"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xAminED.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-11-28T18:28:22.000Z","updated_at":"2024-11-28T20:28:44.000Z","dependencies_parsed_at":"2024-11-28T19:32:20.163Z","dependency_job_id":null,"html_url":"https://github.com/0xAminED/APA","commit_stats":null,"previous_names":["0xamined/apa"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xAminED%2FAPA","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xAminED%2FAPA/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xAminED%2FAPA/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xAminED%2FAPA/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xAminED","download_url":"https://codeload.github.com/0xAminED/APA/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245950544,"owners_count":20699090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["c","c2-detection","network-analysis","network-traffic-analysis","pcap","pcap-analyzer"],"created_at":"2024-12-07T03:11:02.724Z","updated_at":"2025-03-28T01:22:44.037Z","avatar_url":"https://github.com/0xAminED.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Advanced Packet Analyzer (APA)\n\nAn advanced **Packet Analyzer** written in C that processes **PCAP files** to analyze network traffic in great detail. This tool provides comprehensive information about captured network packets, including Ethernet, IP, TCP, UDP, ICMP, and ARP headers. It is designed for network professionals who need to deeply inspect network traffic captured in PCAP files.\n\n## Features\n\n- **Ethernet Header Parsing**: Extracts MAC addresses and Ethernet type.\n- **IP Header Parsing**: Handles IPv4 and IPv6, extracting source/destination IPs, protocol type (TCP, UDP, ICMP, etc.), and more.\n- **TCP Header Parsing**: Displays details about source/destination ports, sequence/acknowledgment numbers, flags, window size, and checksum.\n- **UDP Header Parsing**: Shows source/destination ports, length, and checksum.\n- **ICMP Header Parsing**: Extracts ICMP type, code, checksum, and additional parameters.\n- **ARP Header Parsing**: Recognizes ARP requests/replies and extracts sender/target MAC/IP addresses.\n- **Comprehensive Packet Information**: Displays timestamp, packet length, and protocol details.\n- **Cross-Platform**: Should work on Linux, macOS, and Windows (with minor adjustments for Windows build tools).\n\n## Requirements\n\n- **C Compiler**: `gcc` or compatible C compiler.\n- **libpcap**: Required for reading PCAP files. Install using package managers like `apt-get` on Ubuntu or `brew` on macOS.\n\n### Installation\n\nTo build and run the project on a Linux-based system:\n\n1. **Install libpcap**:\n\n```bash\nsudo apt-get install libpcap-dev\n```\n\n2. **Clone the repository**:\n\n```bash\ngit clone https://github.com/0xAminED/APA.git\ncd APA\n```\n3. **Compile the code**:\n\n```bash\ngcc -o APA APA.c -lpcap\n```\n4. **Run the packet analyzer with a PCAP file**:\n\n```bash\n./APA your_pcap_file.pcap\n```\n\n## Example Output\n```bash\nStarting packet analysis...\nPacket Length: 66 bytes\nCaptured at: Thu Sep 15 14:25:35 2022\n== Ethernet Header ==\nSource MAC: 00:0c:29:8c:5a:6e\nDestination MAC: 00:0c:29:71:82:3d\nEthernet Type: 0x0800\n\n== IP Header ==\nSource IP: 192.168.1.1\nDestination IP: 192.168.1.2\nIP Version: 4\nHeader Length: 20 bytes\nProtocol: 6 (TCP)\n\n== TCP Header ==\nSource Port: 80\nDestination Port: 12345\nSequence Number: 12345678\nAcknowledgment Number: 23456789\nFlags: 0x18\nWindow Size: 8192\nChecksum: 0x1234\nUrgent Pointer: 0\n\n...\n```\n\n## How it Works\n\n1. **Ethernet Header**: The program starts by parsing the Ethernet frame, displaying source and destination MAC addresses, and the Ethernet type.\n2. **IP Header**: The IP header is parsed to extract the source and destination IP addresses, IP version, protocol type (TCP, UDP, ICMP, etc.), and header length.\n3. **TCP Header**: If the packet is TCP, it parses the TCP header to display useful information such as source and destination ports, sequence and acknowledgment numbers, window size, and flags.\n4. **UDP Header**: For UDP packets, the program displays source and destination ports, UDP length, and checksum.\n5. **ICMP Header**: If the packet is ICMP (such as a ping request/response), it parses and prints the ICMP type, code, checksum, and identifier.\n6. **ARP Header**: ARP requests and replies are also handled, and the program displays sender/target MAC and IP addresses.\n\n\n## Future Enhancements\n- **Support for more protocols**: Add support for additional protocols such as IPv6, DNS, HTTP, etc.\n- **Packet Filtering**: Allow filtering of packets by IP, protocol, ports, etc.\n- **Statistics**: Provide traffic statistics, such as packet counts, byte counts, etc.\n- **GUI Interface**: Develop a graphical user interface to visualize packet data and network activity.\n- **Export Data**: Export packet analysis results to CSV, JSON, or other formats.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## Acknowledgments\n\n- Thanks to the contributors for their valuable feedback and improvements.\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xamined%2Fapa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xamined%2Fapa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xamined%2Fapa/lists"}