Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed issue #9, fixed issue #8 ( switched to ACRA ), fixed issue #4 (

now 2.3 compatible thanks to ActionBar Sherlock!!! )
  • Loading branch information...
commit 65c9cfb0c1933ddc2b91d0b0ad9ebd18e481e6f7 1 parent 4e1fad2
@evilsocket authored
View
6 AndroidManifest.xml
@@ -1,15 +1,15 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="it.evilsocket.dsploit"
android:versionCode="1"
- android:versionName="1.0.4b" >
+ android:versionName="1.0.5b" >
- <uses-sdk android:minSdkVersion="11" android:targetSdkVersion="15" />
+ <uses-sdk android:minSdkVersion="9" android:targetSdkVersion="15" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"/>
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
- <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" >
+ <application android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:name="DSploitApplication">
<activity android:name=".MainActivity" android:label="@string/title_activity_main" android:screenOrientation="landscape" android:configChanges="keyboardHidden|orientation">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
View
6 README.md
@@ -1,4 +1,3 @@
-
dSploit - An Android network penetration suite.
==============================
@@ -15,10 +14,13 @@ and running services, search for **known vulnerabilities**, crack logon procedur
man in the middle attacks such as **password sniffing** ( with common protocols dissection ), real time **traffic
manipulation**, etc, etc .
+This application is still in **beta stage**, a stable release will be available as soon as possible, but expect
+some crash or strange behaviour until then, in any case, feel free to submit an issue here on GitHub.
+
Requirements
-------------
-- An Android device with at least the 3.0 version of the OS.
+- An Android device with at least the 2.3 ( Gingerbread ) version of the OS.
- The device **must be rooted**.
- The device must have a BusyBox **full install**, this means with **every** utility installed ( not the partial installation ).
View
2  VERSION
@@ -1 +1 @@
-1.0.4b
+1.0.5b
View
BIN  libs/acra-4.3.0.jar
Binary file not shown
View
1  project.properties
@@ -13,3 +13,4 @@
# Project target.
target=android-14
android.library=false
+android.library.reference.1=../ActioBarSherlock/library
View
3  res/values/strings.xml
@@ -3,5 +3,6 @@
<string name="app_name">DSploit</string>
<string name="menu_settings">Settings</string>
<string name="title_activity_main">dSploit</string>
-
+ <string name="crash_toast_text">Ooooops ! I crashed, but a report is going to be sent to my developer to help fix the issue :)</string>
+
</resources>
View
355 src/it/evilsocket/dsploit/MainActivity.java
@@ -21,7 +21,8 @@
import java.io.IOException;
import java.util.ArrayList;
-import it.evilsocket.dsploit.core.CrashManager;
+import com.actionbarsherlock.app.SherlockListActivity;
+
import it.evilsocket.dsploit.core.System;
import it.evilsocket.dsploit.core.Shell;
import it.evilsocket.dsploit.core.ToolsInstaller;
@@ -47,7 +48,6 @@
import it.evilsocket.dsploit.plugins.mitm.MITM;
import it.evilsocket.dsploit.tools.NMap.FindAliveEndpointsOutputReceiver;
-import android.app.ListActivity;
import android.app.ProgressDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
@@ -57,9 +57,6 @@
import android.net.Uri;
import android.os.Bundle;
import android.view.LayoutInflater;
-import android.view.Menu;
-import android.view.MenuInflater;
-import android.view.MenuItem;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
@@ -68,7 +65,11 @@
import android.widget.TextView;
import android.widget.Toast;
-public class MainActivity extends ListActivity
+import com.actionbarsherlock.view.Menu;
+import com.actionbarsherlock.view.MenuInflater;
+import com.actionbarsherlock.view.MenuItem;
+
+public class MainActivity extends SherlockListActivity
{
private static final int LAYOUT = R.layout.target_layout;
@@ -188,10 +189,7 @@ else if( Network.isWifiConnected( MainActivity.this ) )
System.registerPlugin( new LoginCracker( ) );
System.registerPlugin( new MITM( ) );
System.registerPlugin( new PacketForger( ) );
-
- // register the crash manager
- CrashManager.register( getApplicationContext() );
-
+
mTargetAdapter = new TargetAdapter( R.layout.target_list_item );
setListAdapter( mTargetAdapter );
@@ -278,194 +276,195 @@ public void run() {
}
@Override
- public boolean onCreateOptionsMenu(Menu menu) {
- new MenuInflater(this).inflate( R.menu.main, menu );
+ public boolean onCreateOptionsMenu( Menu menu ) {
+ MenuInflater inflater = getSupportMenuInflater();
+ inflater.inflate( R.menu.main, menu );
return super.onCreateOptionsMenu(menu);
}
@Override
- public boolean onOptionsItemSelected(MenuItem item) {
+ public boolean onOptionsItemSelected( MenuItem item ) {
+
+ int itemId = item.getItemId();
- switch( item.getItemId() )
+ if( itemId == R.id.add )
{
- case R.id.add:
-
- new InputDialog( "Add custom target", "Enter an URL, host name or ip address below:", MainActivity.this, new InputDialogListener(){
- @Override
- public void onInputEntered( String input )
- {
- Target target = Target.getFromString(input);
- if( target != null )
- {
- if( System.addOrderedTarget( target ) == true )
- {
- // refresh the target listview
- MainActivity.this.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- if( mTargetAdapter != null )
- mTargetAdapter.notifyDataSetChanged();
- }
- });
- }
- }
- else
- new ErrorDialog( "Error", "Invalid target.", MainActivity.this ).show();
- }}
- ).show();
-
- return true;
-
- case R.id.scan:
-
- try
+ new InputDialog( "Add custom target", "Enter an URL, host name or ip address below:", MainActivity.this, new InputDialogListener(){
+ @Override
+ public void onInputEntered( String input )
{
- final ProgressDialog dialog = ProgressDialog.show( MainActivity.this, "", "Searching alive endpoints ...", true, false );
-
- System.getNMap().findAliveEndpoints( System.getNetwork(), new FindAliveEndpointsOutputReceiver(){
- @Override
- public void onEndpointFound( Endpoint endpoint ) {
- Target target = new Target( endpoint );
-
- if( System.addOrderedTarget( target ) == true )
- {
- // refresh the target listview
- MainActivity.this.runOnUiThread(new Runnable() {
- @Override
- public void run() {
- if( mTargetAdapter != null )
- mTargetAdapter.notifyDataSetChanged();
- }
- });
- }
- }
-
- @Override
- public void onEnd( int code ) {
- dialog.dismiss();
+ Target target = Target.getFromString(input);
+ if( target != null )
+ {
+ if( System.addOrderedTarget( target ) == true )
+ {
+ // refresh the target listview
+ MainActivity.this.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ if( mTargetAdapter != null )
+ mTargetAdapter.notifyDataSetChanged();
+ }
+ });
}
- }).start();
- }
- catch( Exception e )
- {
- new FatalDialog( "Error", e.toString(), MainActivity.this ).show();
- }
-
- return true;
-
- case R.id.new_session:
-
- new ConfirmDialog( "Warning", "Starting a new session would delete the current one, continue ?", this, new ConfirmDialogListener(){
- @Override
- public void onConfirm() {
- try
- {
- System.reset();
- mTargetAdapter.notifyDataSetChanged();
-
- Toast.makeText( MainActivity.this, "New session started", Toast.LENGTH_SHORT ).show();
- }
- catch( Exception e )
- {
- new FatalDialog( "Error", e.toString(), MainActivity.this ).show();
- }
- }}
- ).show();
+ }
+ else
+ new ErrorDialog( "Error", "Invalid target.", MainActivity.this ).show();
+ }}
+ ).show();
+
+ return true;
+ }
+ else if( itemId == R.id.scan )
+ {
+ try
+ {
+ final ProgressDialog dialog = ProgressDialog.show( MainActivity.this, "", "Searching alive endpoints ...", true, false );
- return true;
-
- case R.id.save_session :
+ System.getNMap().findAliveEndpoints( System.getNetwork(), new FindAliveEndpointsOutputReceiver(){
+ @Override
+ public void onEndpointFound( Endpoint endpoint ) {
+ Target target = new Target( endpoint );
+
+ if( System.addOrderedTarget( target ) == true )
+ {
+ // refresh the target listview
+ MainActivity.this.runOnUiThread(new Runnable() {
+ @Override
+ public void run() {
+ if( mTargetAdapter != null )
+ mTargetAdapter.notifyDataSetChanged();
+ }
+ });
+ }
+ }
- new InputDialog( "Save Session", "Enter the name of the session file :", System.getSessionName(), true, MainActivity.this, new InputDialogListener(){
@Override
- public void onInputEntered( String input )
+ public void onEnd( int code ) {
+ dialog.dismiss();
+ }
+ }).start();
+ }
+ catch( Exception e )
+ {
+ new FatalDialog( "Error", e.toString(), MainActivity.this ).show();
+ }
+
+ return true;
+ }
+ else if( itemId == R.id.new_session )
+ {
+ new ConfirmDialog( "Warning", "Starting a new session would delete the current one, continue ?", this, new ConfirmDialogListener(){
+ @Override
+ public void onConfirm() {
+ try
{
- String name = input.trim().replace( "/", "" ).replace( "..", "" );
-
- if( name.isEmpty() == false )
- {
- try
- {
- String filename = System.saveSession( name );
+ System.reset();
+ mTargetAdapter.notifyDataSetChanged();
- Toast.makeText( MainActivity.this, "Session saved to " + filename + " .", Toast.LENGTH_SHORT ).show();
- }
- catch( IOException e )
- {
- new ErrorDialog( "Error", e.toString(), MainActivity.this ).show();
- }
- }
- else
- new ErrorDialog( "Error", "Invalid session name.", MainActivity.this ).show();
- }}
- ).show();
-
- return true;
-
- case R.id.restore_session :
-
- final ArrayList<String> sessions = System.getAvailableSessionFiles();
-
- if( sessions != null && sessions.size() > 0 )
- {
- new SpinnerDialog( "Select Session", "Select a session file from the sd card :", sessions.toArray( new String[ sessions.size() ] ), MainActivity.this, new SpinnerDialogListener(){
- @Override
- public void onItemSelected(int index)
- {
- String session = sessions.get( index );
+ Toast.makeText( MainActivity.this, "New session started", Toast.LENGTH_SHORT ).show();
+ }
+ catch( Exception e )
+ {
+ new FatalDialog( "Error", e.toString(), MainActivity.this ).show();
+ }
+ }}
+ ).show();
- try
- {
- System.loadSession( session );
- mTargetAdapter.notifyDataSetChanged();
- }
- catch( Exception e )
- {
- e.printStackTrace();
- new ErrorDialog( "Error", e.getMessage(), MainActivity.this ).show();
- }
- }
- }).show();
- }
- else
- new ErrorDialog( "Error", "No session file found on sd card.", MainActivity.this ).show();
-
- return true;
-
- case R.id.ss_monitor :
-
- if( NetworkMonitorService.RUNNING )
+ return true;
+ }
+ else if( itemId == R.id.save_session )
+ {
+ new InputDialog( "Save Session", "Enter the name of the session file :", System.getSessionName(), true, MainActivity.this, new InputDialogListener(){
+ @Override
+ public void onInputEntered( String input )
{
- stopService( new Intent( this, NetworkMonitorService.class ) );
+ String name = input.trim().replace( "/", "" ).replace( "..", "" );
- item.setTitle( "Start Network Monitor" );
- }
- else
- {
- startService( new Intent( this, NetworkMonitorService.class ) );
+ if( name.isEmpty() == false )
+ {
+ try
+ {
+ String filename = System.saveSession( name );
- item.setTitle( "Stop Network Monitor" );
- }
-
- return true;
-
- case R.id.submit_issue :
-
- String uri = "https://github.com/evilsocket/dsploit/issues/new";
- Intent browser = new Intent( Intent.ACTION_VIEW, Uri.parse( uri ) );
-
- startActivity( browser );
-
- return true;
-
- case R.id.about:
+ Toast.makeText( MainActivity.this, "Session saved to " + filename + " .", Toast.LENGTH_SHORT ).show();
+ }
+ catch( IOException e )
+ {
+ new ErrorDialog( "Error", e.toString(), MainActivity.this ).show();
+ }
+ }
+ else
+ new ErrorDialog( "Error", "Invalid session name.", MainActivity.this ).show();
+ }}
+ ).show();
+
+ return true;
+ }
+ else if( itemId == R.id.restore_session )
+ {
+ final ArrayList<String> sessions = System.getAvailableSessionFiles();
+
+ if( sessions != null && sessions.size() > 0 )
+ {
+ new SpinnerDialog( "Select Session", "Select a session file from the sd card :", sessions.toArray( new String[ sessions.size() ] ), MainActivity.this, new SpinnerDialogListener(){
+ @Override
+ public void onItemSelected(int index)
+ {
+ String session = sessions.get( index );
+
+ try
+ {
+ System.loadSession( session );
+ mTargetAdapter.notifyDataSetChanged();
+ }
+ catch( Exception e )
+ {
+ e.printStackTrace();
+ new ErrorDialog( "Error", e.getMessage(), MainActivity.this ).show();
+ }
+ }
+ }).show();
+ }
+ else
+ new ErrorDialog( "Error", "No session file found on sd card.", MainActivity.this ).show();
+
+ return true;
+ }
+ else if( itemId == R.id.ss_monitor )
+ {
+ if( NetworkMonitorService.RUNNING )
+ {
+ stopService( new Intent( this, NetworkMonitorService.class ) );
- new AboutDialog( this ).show();
+ item.setTitle( "Start Network Monitor" );
+ }
+ else
+ {
+ startService( new Intent( this, NetworkMonitorService.class ) );
- return true;
+ item.setTitle( "Stop Network Monitor" );
+ }
+
+ return true;
}
-
- return super.onOptionsItemSelected(item);
+ else if( itemId == R.id.submit_issue )
+ {
+ String uri = "https://github.com/evilsocket/dsploit/issues/new";
+ Intent browser = new Intent( Intent.ACTION_VIEW, Uri.parse( uri ) );
+
+ startActivity( browser );
+
+ return true;
+ }
+ else if( itemId == R.id.about )
+ {
+ new AboutDialog( this ).show();
+
+ return true;
+ }
+ else
+ return super.onOptionsItemSelected(item);
}
@Override
View
156 src/it/evilsocket/dsploit/core/CrashManager.java
@@ -1,156 +0,0 @@
-/*
- * This file is part of the dSploit.
- *
- * Copyleft of Simone Margaritelli aka evilsocket <evilsocket@gmail.com>
- *
- * dSploit is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * dSploit is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with dSploit. If not, see <http://www.gnu.org/licenses/>.
- */
-package it.evilsocket.dsploit.core;
-
-import java.io.BufferedReader;
-import java.io.InputStreamReader;
-import java.io.OutputStreamWriter;
-import java.io.PrintWriter;
-import java.io.StringWriter;
-import java.io.Writer;
-import java.lang.Thread.UncaughtExceptionHandler;
-import java.net.URL;
-import java.net.URLConnection;
-import java.net.URLEncoder;
-import java.util.Date;
-
-import android.content.Context;
-import android.content.pm.PackageInfo;
-import android.content.pm.PackageManager;
-import android.os.StrictMode;
-import android.util.Log;
-
-public class CrashManager implements UncaughtExceptionHandler
-{
- private static final String TAG = "CRASHMANAGER";
- private static final String RECEIVER = "http://dsploit.evilsocket.net/crash_report_receiver.php";
-
- private Context mContext = null;
- private UncaughtExceptionHandler mDefaultHandler = null;
-
- public CrashManager( Context context ) {
- mContext = context;
- mDefaultHandler = Thread.getDefaultUncaughtExceptionHandler();
- }
-
- public static void register( Context context ) {
- Thread.setDefaultUncaughtExceptionHandler( new CrashManager( context ) );
- }
-
- @Override
- public void uncaughtException( Thread thread, Throwable exception ) {
- try
- {
- PackageManager manager = mContext.getPackageManager();
- PackageInfo info = manager.getPackageInfo( mContext.getPackageName(), 0 );
- Writer sWriter = new StringWriter();
- PrintWriter pWriter = new PrintWriter( sWriter );
- Throwable cause = null;
- String report = "";
-
- report = "CRASH REPORT [Ê" + ( new Date() ).toString() + " ]\n\n" +
-
- "==========================================\n" +
- "Environment :\n\n" +
-
- " Version : " + info.versionName + "\n" +
- " Package : " + info.packageName + "\n" +
- " File Path : " + mContext.getFilesDir().getAbsolutePath() + "\n\n" +
- " Package Data \n" +
- " Phone Model : " + android.os.Build.MODEL + "\n" +
- " Android Ver : " + android.os.Build.VERSION.RELEASE + "\n" +
- " Board : " + android.os.Build.BOARD + "\n" +
- " Brand : " + android.os.Build.BRAND + "\n" +
- " Device : " + android.os.Build.DEVICE + "\n" +
- " Display : " + android.os.Build.DISPLAY + "\n" +
- " Finger Print: " + android.os.Build.FINGERPRINT + "\n" +
- " Host : " + android.os.Build.HOST + "\n" +
- " ID : " + android.os.Build.ID + "\n" +
- " Model : " + android.os.Build.MODEL + "\n" +
- " Product : " + android.os.Build.PRODUCT + "\n" +
- " Tags : " + android.os.Build.TAGS + "\n" +
- " Time : " + android.os.Build.TIME + "\n" +
- " Type : " + android.os.Build.TYPE + "\n" +
- " User : " + android.os.Build.USER + "\n\n" +
-
- "==========================================\n" +
- "Stack Trace :\n\n";
-
- exception.printStackTrace( pWriter );
-
- report += sWriter.toString() + "\n\n" +
- "==========================================\n";
-
- // If the exception was thrown in a background thread inside
- // AsyncTask, then the actual exception can be found with getCause
- int i = 0, max = 500;
- while( ( cause = exception.getCause() ) != null && ( ++i <= max ))
- {
- cause.printStackTrace( pWriter );
- report += sWriter.toString() + "\n";
- }
-
- pWriter.close();
-
- Log.w( TAG, report );
-
- try
- {
- // This is needed to avoid NetworkOnMainThreadException
- StrictMode.ThreadPolicy policy = new StrictMode.ThreadPolicy.Builder().permitAll().build();
- StrictMode.setThreadPolicy(policy);
-
- // TODO: Add a "sending report bla bla bla" activity.
- String data = URLEncoder.encode( "report", "UTF-8" ) + "=" + URLEncoder.encode( report, "UTF-8");
- URL url = new URL( RECEIVER );
- URLConnection conn = url.openConnection();
- OutputStreamWriter writer;
- BufferedReader reader;
-
- conn.setDoOutput(true);
-
- writer = new OutputStreamWriter( conn.getOutputStream() );
- writer.write(data);
- writer.flush();
-
- reader = new BufferedReader( new InputStreamReader( conn.getInputStream() ) );
- String line;
- while( (line = reader.readLine()) != null )
- {
- Log.d( TAG, line );
- }
-
- reader.close();
- writer.close();
- }
- catch( Exception e )
- {
- Log.e( TAG, e.toString() );
- }
- }
- catch( Exception e )
- {
- Log.e( TAG, e.toString() );
- }
-
- // let the exception be handled by android framework
- mDefaultHandler.uncaughtException( thread, exception );
- }
-
-}
View
1  src/it/evilsocket/dsploit/net/http/proxy/StreamThread.java
@@ -54,7 +54,6 @@ public void run() {
try
{
- // TODO: Implement support for chunkend transfer encoding
while( ( read = mReader.read( chunk, 0, CHUNK_SIZE ) ) > 0 )
{
mBuffer.append( chunk, read );
View
14 src/it/evilsocket/dsploit/plugins/LoginCracker.java
@@ -47,18 +47,7 @@
private static final String[] PROTOCOLS = new String[]
{
"ftp",
- /* TODO:
"http-head",
- "http-get",
- "http-get-form",
- "http-post-form",
- "https-get-form",
- "https-post-form",
- "https-head",
- "https-get",
- "http-proxy",
- "http-proxy-ntlm",
- */
"icq",
"imap",
"imap-ntlm",
@@ -97,7 +86,6 @@
"vmauthd"
};
- // TODO: Add support for custom charsets
private static final String[] CHARSETS = new String[]
{
"a-z",
@@ -118,8 +106,8 @@
private static String[] USERNAMES = new String[]
{
- "saroot",
"admin",
+ "saroot",
"root",
"administrator",
"Administrator",
View
3  src/it/evilsocket/dsploit/tools/Hydra.java
@@ -80,6 +80,9 @@ public void onEnd( int exitCode ) {
public Thread crack( Target target, int port, String service, String charset, int minlength, int maxlength, String username, AttemptReceiver receiver ){
String command = "-F -l " + username + " -s " + port + " -x " + minlength + ":" + maxlength + ":" + charset + " -V -t 10 " + target.getCommandLineRepresentation() + " " + service;
+ if( service.equalsIgnoreCase("http-head") )
+ command += " /";
+
return super.async( command, receiver );
}
}
Please sign in to comment.
Something went wrong with that request. Please try again.