Skip to content

Instantly share code, notes, and snippets.

@ndunks
Last active July 30, 2023 13:26
Show Gist options
  • Select an option

  • Save ndunks/65a75fa57987bb231ab66a172c5ac2bd to your computer and use it in GitHub Desktop.

Select an option

Save ndunks/65a75fa57987bb231ab66a172c5ac2bd to your computer and use it in GitHub Desktop.

Revisions

  1. ndunks revised this gist Jul 30, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bettercap-waydroid.sh
    Original file line number Diff line number Diff line change
    @@ -22,4 +22,4 @@ sudo cp ~/.bettercap-ca.cert.pem ./mount/system/etc/security/cacerts/7a3894f6.0
    # - then move it to system cers
    cd ./mount/system/etc/security/cacerts

    sudo bettercap -iface waydroid0 -eval 'set dns.spoof.domains *; set dns.spoof.all true; dns.spoof on; http.proxy on; https.proxy on; http-ui;'
    sudo bettercap -iface waydroid0 -eval 'set events.stream.http.request.dump true; set events.stream.http.response.dump true; set dns.spoof.domains *; set dns.spoof.all true; dns.spoof on; http.proxy on; https.proxy on;'
  2. ndunks revised this gist Jul 30, 2023. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions bettercap-waydroid.sh
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    #!/bin/false

    # Run without root( not fully work, miss some caps)
    sudo setcap 'cap_net_bind_service=ep cap_net_admin=ep cap_net_broadcast=ep cap_net_raw=ep ' ./bettercap
    sudo setcap 'cap_net_bind_service=ep cap_net_admin=ep cap_net_broadcast=ep cap_net_raw=ep cap_fowner=ep cap_sys_admin=ep' `which bettercap`

    # Trust bettercap Root Ca (Fake GoDaddy)

    @@ -22,4 +22,4 @@ sudo cp ~/.bettercap-ca.cert.pem ./mount/system/etc/security/cacerts/7a3894f6.0
    # - then move it to system cers
    cd ./mount/system/etc/security/cacerts

    sudo ./bettercap -iface waydroid0 -eval 'set dns.spoof.domains *; set dns.spoof.all true; dns.spoof on; http.proxy on; https.proxy on;'
    sudo bettercap -iface waydroid0 -eval 'set dns.spoof.domains *; set dns.spoof.all true; dns.spoof on; http.proxy on; https.proxy on; http-ui;'
  3. ndunks revised this gist Jul 30, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion bettercap-waydroid.sh
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@ sudo setcap 'cap_net_bind_service=ep cap_net_admin=ep cap_net_broadcast=ep cap_n
    sudo mount /dev/loop0 ./mount

    # Android 11 Go Daddy original CA root
    system.img: system/etc/security/cacert/bc3f2570.0
    system.img: system/etc/security/cacerts/bc3f2570.0

    openssl x509 -in ./bc3f2570.0 -text | grep Issuer

  4. ndunks revised this gist Jul 30, 2023. 1 changed file with 7 additions and 1 deletion.
    8 changes: 7 additions & 1 deletion bettercap-waydroid.sh
    Original file line number Diff line number Diff line change
    @@ -11,9 +11,15 @@ sudo mount /dev/loop0 ./mount
    system.img: system/etc/security/cacert/bc3f2570.0

    openssl x509 -in ./bc3f2570.0 -text | grep Issuer

    openssl x509 -inform PEM -subject_hash_old -in .bettercap-ca.cert.pem | head -n 1
    # 7a3894f6
    sudo cp ~/.bettercap-ca.cert.pem ./mount/system/etc/security/cacerts/7a3894f6.0

    # https://gist.github.com/pwlin/8a0d01e6428b7a96e2eb
    # - copy ca to android
    # - Install it using setings
    # - then move it to system cers
    cd ./mount/system/etc/security/cacerts
    sudo cp ~/.bettercap-ca.cert.pem ./mount/system/etc/security/cacerts/bc3f2570.0

    sudo ./bettercap -iface waydroid0 -eval 'set dns.spoof.domains *; set dns.spoof.all true; dns.spoof on; http.proxy on; https.proxy on;'
  5. ndunks revised this gist Jul 30, 2023. 1 changed file with 5 additions and 1 deletion.
    6 changes: 5 additions & 1 deletion bettercap-waydroid.sh
    Original file line number Diff line number Diff line change
    @@ -11,5 +11,9 @@ sudo mount /dev/loop0 ./mount
    system.img: system/etc/security/cacert/bc3f2570.0

    openssl x509 -in ./bc3f2570.0 -text | grep Issuer
    # Replace it
    # https://gist.github.com/pwlin/8a0d01e6428b7a96e2eb
    # - copy ca to android
    # - Install it using setings
    # - then move it to system cers
    cd ./mount/system/etc/security/cacerts
    sudo cp ~/.bettercap-ca.cert.pem ./mount/system/etc/security/cacerts/bc3f2570.0
  6. ndunks created this gist Jul 30, 2023.
    15 changes: 15 additions & 0 deletions bettercap-waydroid.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    #!/bin/false

    # Run without root( not fully work, miss some caps)
    sudo setcap 'cap_net_bind_service=ep cap_net_admin=ep cap_net_broadcast=ep cap_net_raw=ep ' ./bettercap

    # Trust bettercap Root Ca (Fake GoDaddy)

    sudo mount /dev/loop0 ./mount

    # Android 11 Go Daddy original CA root
    system.img: system/etc/security/cacert/bc3f2570.0

    openssl x509 -in ./bc3f2570.0 -text | grep Issuer
    # Replace it
    sudo cp ~/.bettercap-ca.cert.pem ./mount/system/etc/security/cacerts/bc3f2570.0