Code Monkey home page Code Monkey logo

pcapdroid's Introduction

PCAPdroid

PCAPdroid is an android app to capture the phone traffic and analyze it remotely (e.g. via Wireshark). The traffic can be easily downloaded from a remote device thanks to the integrated HTTP server, or streamed to a remote UDP receiver.

Realtime Traffic Analysis:

tools/udp_receiver.py -p 1234 | wireshark -k -i -

Features:

  • Capture apps traffic without root
  • Easily download a PCAP file thanks to the integrated HTTP server
  • Stream the PCAP on UDP to a remote receiver
  • Show captured traffic realtime statistics
  • Apply a filter to only capture traffic for the selected app
  • Get active connections details, including server name, DNS query and URL
  • Decrypt HTTPS/TLS traffic via a remote mitmproxy

Download:

https://github.com/emanuele-f/PCAPdroid/releases

https://play.google.com/store/apps/details?id=com.emanuelef.remote_capture

User Guide

Check out the quick start instructions or the full User Guide.

Community

You can help the PCAPdroid project in many ways:

  • Translate the app in your language
  • Improve the app theme and layout
  • Propose and discuss new features
  • Open bug reports with detailed information
  • Star the project on github and on the Play Store
  • Of course provide code pull requests!

You can reach the PCAPdroid developers and community on the telegram channel.

App filter and DNS Traffic

Many applications rely on the Android DNS resolution service netd in order to resolve names. All the DNS requests sent via this service will come from netd, so it's not possible to which app made the request, so the app filter won't work. In order to circunvent this, PCAPdroid will dump all the DNS traffic from netd regardless of the app filter. This can be disabled by toggling off the "Capture Unknown Traffic" preference.

How it Works

In order to run without root, the app takes advantage of the Android VPNService API to collect the packets on the device (they are not sent to an external VPN server). The zdtun connections proxy library is used to route the packets back to their original destination. Here are some diagrams of how it works:

Decrypting HTTPS/TLS Traffic

PCAPdroid supports decrypting TLS traffic by sending it to a customized version of mitmproxy. Check out the User Guide for more details.

Third Party

PCAPdroid integrates nDPI to detect the application protocol of the network connections and extract the SNI from TLS connections.

Building

  1. Clone this repo locally
  2. Clone https://github.com/emanuele-f/zdtun beside this repository
  3. Clone https://github.com/ntop/nDPI beside this repository
  4. Link the cmake file into nDPI: from this repo execute: ln -s $(readlink -f nDPI/CMakeLists.txt) ../nDPI
  5. Inside the nDPI directory, run git checkout 3.4-stable; ./autogen.sh; ./configure --disable-gcrypt
  6. Build the zdtun and ndpi modules first
  7. Then build the app module

pcapdroid's People

Contributors

emanuele-f avatar atrate avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.