[APP] Shark for Root + SharkReader

Search This thread

xtonda

Member
Dec 18, 2006
36
0
Praha - Letňany
I tried to use Shark for root with wifi tethering enabled. Using -D switch it listed following interfaces: rmnet0, wlan0 and m.wlan0. I assume that rmnet0 is cellular and wlan0 is wifi but I have no idea what m.wlan0 can be. I want to capture devices using wifi hotspot and do not want communication from Android device itself to be included. Trying to figure out what interface will be best to capture. Any ideas?
Thanks
 

J0k4r

Member
Sep 29, 2012
16
2
Hey guys, can somone tell if it works with my sgs 2? google says it has monitor mode, so it should work shouldn't it?

of course it's also rooted.

but how exactly does it works? let's say i disconnect from my wlan and delete it from the wlan list. is it possible to capture the handshake?
so which parameters do i need and do i have to press connect to the network while shark for root is running? or does it automaticly sniffes in available wlans?

so i say thanks now for all informative answers, i'm really interested in this topic. maybe i'll change the wpa2 key from my twenty letters (with special letters like # and &) or is it safety?


greetings.
 

Syperus

New member
Apr 28, 2011
3
0
Thanks for this app ex87. It is working really well on my HP Touchpad running CM9. I wish you could delete the pcaps from the Shark for Root app, but other than that it's great. Thanks again!!!
 

cloooned

Senior Member
Mar 5, 2013
57
8
Is there any way to run the capture NOT in the promiscuous mode? I tried the tcpdump option -p on normal and native App whithout any effect.

I like to capture the real traffic to check my iptables configuration, any hint? Thanks
 

bit2

Member
Apr 21, 2012
27
15
@ex87: thanks for both Shark and SharkReader.
Very useful apps.

Would you mind explaining the various permissions SharkReader requires?
Eg. why does it need android.permission.INTERNET, android.permission.ACCESS_NETWORK_STATE, android.permission.READ_PHONE_STATE?
Is SharkReader not "just" an pcap file reader?
If that's the case, shouldn't it have only an android.permission.READ_EXTERNAL_STORAGE permission? :-o
 

ex87

Retired Recognized Developer
Sep 9, 2008
89
49
36
Ventspils
Permissions are needed for ads provider library.

@ex87: thanks for both Shark and SharkReader.
Very useful apps.

Would you mind explaining the various permissions SharkReader requires?
Eg. why does it need android.permission.INTERNET, android.permission.ACCESS_NETWORK_STATE, android.permission.READ_PHONE_STATE?
Is SharkReader not "just" an pcap file reader?
If that's the case, shouldn't it have only an android.permission.READ_EXTERNAL_STORAGE permission? :-o
 

IvoPereira

New member
Aug 8, 2014
2
0
Such a good project, and no more answers from 2013? :)

After using Shark for a while, I did not figured out how should I specify my passphrase when capturing traffic.

Why? Because to see encrypted traffic in Wireshark (for example) I would need to have that traffic to be captured providing the passphrase. Otherwise I will just see a bunch of random stuff.

Any ideas?
 
Feb 13, 2015
7
1
I opened the app. Pressed start. Waited a while. Saw the file size increase. Then pressed stop. Then clicked open capture file. SharkReader opened and then it said Empty file and shut down.

What do I do now?
 

sitsky

Member
Sep 28, 2010
6
0
Juat in case this is active....

Hey, Great app!
Couple of questions, where can I find the parameter options?
Is there a way to monitor EVERYTHING?
I am looking for a specific type of information, what is exchanged between the cell and the phone as soon as you turn flight mode off,
but I don't know what protocol it is or on what port or anything, so I need to collect everything...
Doable?

Thank you,
~S
 

mwebb34

Senior Member
Sep 9, 2012
3,171
396
Hello!

As Shark for Root is using tcpdump you can use the general tcpdump options:

http://www.tcpdump.org/tcpdump_man.html
Hey I got the shark for root app on Google play. I need to find out someone's texts on there phone will this app let me read texts even if there deleted? I have WiFi at home that's were ill be using it. I also need to know how to set up the app. Thanks

Sent from my Nexus 6 using Tapatalk
 

khawaga

Member
Jan 8, 2016
8
0
Great app but the only problem is that the pcap files opened with sharkreader aren't useful at all
 

Top Liked Posts

  • There are no posts matching your filters.
  • 15
    There were AndroShark, tool for capturing traffic on Android. But there were no newer releases and it seems that original developer dropped project. I liked this tool and used it a lot. But it was set to expire... So there was no simple capture tools available... http://xdaforums.com/showthread.php?t=675206 is home of AndroShark.

    So I made Shark for Root, alternative for AndroShark. Some people asked for possibility to see packets on phone, and for that purpose SharkReader has created (first, "quick and dirty" release).

    Shark for Root

    With tcpdump http://swapper.n3o.lv/lv.n3o.shark_1.0.2.apk
    Native http://swapper.n3o.lv/lv.n3o.sharknative_1.0.2.apk


    SharkReader - unstable...
    (note - run Shark Updater to get traffic analysator)

    http://swapper.n3o.lv/lv.n3o.sharkreader_0.1.6.apk

    Older versions http://swapper.n3o.lv/
    1
    Could someone tell about using different parameters or point me to some website where i could study these?(now i got the defaults)

    And when i open Shark reader i see many "RAW Packet" but i cant get any information from them, just "Packet #number".
    .pcap files are fine when i open them with Wireshark.

    At the bottom i see this: -NULL , what else i can use here and how it effects?

    Interesting app, keep up the good work!:)
    1
    ex87,

    Awesome work bro, life got too busy for me to work more on AndroShark, I really didn't drop it on purpose. But with a busy life, and me still really new at java, it was just too much. I am really glad you picked up the idea and ran with it.

    Do you have any plans to opensource it at all (no worries if you dont)? I would like to be a contributor if you do decide to open source it.

    I really doubt this is of any use. It was the second java app I ever worked on, and was really just a front end. Below is androshark source code. Like I said, this was my second attempt at writing an app, so please don't laugh :) If I were to do it today, I would completely change how it worked. /res/raw/sharktap was just tcpdump.


    Code:
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import android.app.Activity;
    import android.app.AlertDialog;
    import android.os.Bundle;
    import android.util.Log;
    import android.view.View;
    import android.widget.Button;
    import android.widget.RadioButton;
    import android.widget.RadioGroup;
    import android.widget.TextView;
    /**
     * ToDo:
     * Check for root
     * Check for first run
     * 		Install Binaries on first run
     * Check for sdcard mount
     * Display file stats
     * Name pcap based on file name
     * Insert License 
     * kill sharktap on die
     * 
     * @author jcase
     *
     */
    
    
    	public class androshark extends Activity implements /*RadioGroup.OnCheckedChangeListener,*/  Button.OnClickListener  {
    		Button btnStart, btnStop;
    		RadioButton radAll, rad3g, radWifi; //http://java.dzone.com/articles/google-android-tutorial?page=0,4
    	    RadioGroup grpRadio;
    	    TextView txtStatus, txtFilename, txtFilesize;
    	    
          
           
    	    
    		/** Called when the activity is first created. */
    		   @Override
    		   
    		   
    		   
    		   public void onCreate(Bundle savedInstanceState) {
    		       super.onCreate(savedInstanceState);
    		        setContentView(R.layout.main);
    		        btnStart = (Button)this.findViewById(R.id.btnStart);
    		        btnStart.setOnClickListener(this);
    		        btnStop = (Button)this.findViewById(R.id.btnStop);
    		        btnStop.setOnClickListener(this);
    		        long epoch = System.currentTimeMillis()/1000;
    
    		        
    		     
    		        boolean exists = (new File("/data/data/net.andirc.androshark/files/sharktap")).exists();
    		        if (exists) {
    		        } else {
    					   Process myproc = null;
    					       try
    					       {
    									     try{
    									    	    String strDirectoy ="/data/data/net.andirc.androshark/files";
    									    	    new File(strDirectoy).mkdir();
    
    									     }
    									     finally {} 
    										 InputStream ins = getResources().openRawResource(R.raw.sharktap);
    										 int size = ins.available();
    										 byte[] buffer = new byte[size];
    										 ins.read(buffer);
    										 ins.close(); 
    										 FileOutputStream fos = new FileOutputStream("/data/data/net.andirc.androshark/files/sharktap");
    										 fos.write(buffer);
    										 fos.close();
    			 
    					       }
    					        
    					       catch (Exception ex)
    					       {
    					               Log.e("yourTag", "Oops something happened: " + ex.getMessage(), ex);
    					       }
    
    					       finally {}
    		        	
    		        }
    		        
    		        boolean exists2 = (new File("/sdcard/androshark/")).exists();
    		        if (exists2) {
    		     
    
    		        } else {
    		        	if (android.os.Environment.getExternalStorageState().equals( 
    		        			android.os.Environment.MEDIA_MOUNTED)) {
    		        	
    					   Process myproc = null;
    				      
    					       try
    					       {
    										 myproc = Runtime.getRuntime().exec(new String[] {"su", "-c","chmod 755 /data/data/net.andirc.androshark/files/sharktap && mkdir /sdcard/androshark/"});					 
    								         	new AlertDialog.Builder(this)  
    										       .setMessage("This is a beta trial version of androshark and will expire on May 15th 2010. This app can potentially consume a lot of sdcard space, depending on how long you allow it to sniff traffic and how much bandwidth you are using.")
    										       .setPositiveButton("OK", null)
    										       .show();
    					       }
    					        
    					       catch (Exception ex)
    					       {
    					               Log.e("yourTag", "Oops something happened: " + ex.getMessage(), ex);
    					       }
    
    					       finally {}
    		        	} else {
    			         	new AlertDialog.Builder(this)  
    					       .setMessage("Error sd01: sdCard not found!")
    					       .setPositiveButton("OK", null)
    					       .show();
    		        	}
    		        }
    		        
    		        if (epoch >= 1273990849) { // May 15th 2010  1273990849
    			      System.exit(0);
    		        } 
    
    	    } 
    		   
    		   
    			public void onClick(View v) {
    				
    			   Process myproc = null;
    		      
    			       try
    			       {
    
    						if (v == btnStart) {
    							if (android.os.Environment.getExternalStorageState().equals( 
    				        			android.os.Environment.MEDIA_MOUNTED)) {
    								
    							
    								 myproc = Runtime.getRuntime().exec(new String[] {"su", "-c", "kill $(ps | grep sharktap | tr -s  ' ' | cut -d ' ' -f2) && /data/data/net.andirc.androshark/files/sharktap -vv -s 0 -w /sdcard/androshark/dump.pcap"});
    
    
    								 
    							        TextView txtStatus = 
    								    (TextView)  this.findViewById(R.id.txtStatus); 
    								    txtStatus.setText("Status: Running"); 
    								        
    							        TextView txtFilename = 
    									(TextView)  this.findViewById(R.id.txtFilename); 
    							        txtFilename.setText("Filename: /sdcard/androshark/dump.pcap"); 
    							        
    							    /*      int running = 1;
    							          do {
    							        	  File file = new File("/sdcard/androshark/dump.pcap");
    											long length = file.length();
    									        TextView txtFilesize = 
    											(TextView)  this.findViewById(R.id.txtFilesize); 
    										    txtFilesize.setText("File Size: " + length/1024 + "KB");
    							          } while (running <= 1); */
    								} else {
    						         	new AlertDialog.Builder(this)  
    								       .setMessage("Error sd02: sdCard not found!")
    								       .setPositiveButton("OK", null)
    								       .show();	
    								}
    							        
    							        
    							 } else if (v == btnStop) {
    				
    								 myproc = Runtime.getRuntime().exec(new String[] {"su", "-c", "kill $(ps | grep sharktap | tr -s  ' ' | cut -d ' ' -f2)"});
    								 myproc.waitFor();
    								 
    								 File file = new File("/sdcard/androshark/dump.pcap");
    								 long length = file.length();
    
    								 
    							        TextView txtStatus = 
    								    (TextView)  this.findViewById(R.id.txtStatus); 
    								    txtStatus.setText("Status: Stopped");
    							        TextView txtFilesize = 
    									(TextView)  this.findViewById(R.id.txtFilesize); 
    							        txtFilesize.setText("File Size: " + length/1024 + "KB");
    							 } 
    
    			       }
    			        
    			       catch (Exception ex)
    			       {
    			               Log.e("yourTag", "Oops something happened: " + ex.getMessage(), ex);
    			       }
    
    			       finally {} 
    		  
    
    
    		}
    		   
    		
    		   
    	}
    1
    Can some please explain in lamon terms what this does? :confused:

    LOL this is nothing like that my friend.. nothing at all

    Apparently you know, and still haven't helped those of us who have no idea what this app is for! :p
    1
    How can I keep the app running even when I have closed the window??
    Is there a way of keeping the application running for like good half an hour in the background so that I can do other things with my phone at the same time??
    It's not possible yet by using only this app, but planning to be on next release (running app as an service).
    Meanwhile you may try some memory optimization applications which can set killing priorities for applications.