From 484d940be9a1843383a2b6481772395a63146545 Mon Sep 17 00:00:00 2001 From: Balint Kovacs Date: Tue, 22 Mar 2011 14:47:14 +0100 Subject: [PATCH] Minor logging cleanup and bugfixes Finally a working proof-of-concept Signed-off-by: Balint Kovacs --- bin/SSLDroid.apk | Bin 17935 -> 18203 bytes bin/classes.dex | Bin 10172 -> 10740 bytes bin/resources.ap_ | Bin 11191 -> 11195 bytes res/layout/main.xml | 2 +- src/hu/blint/ssldroid/SSLDroid.java | 24 +++------------- src/hu/blint/ssldroid/TcpProxy.java | 42 ++++++++++++++++------------ 6 files changed, 29 insertions(+), 39 deletions(-) diff --git a/bin/SSLDroid.apk b/bin/SSLDroid.apk index a7b66ce9dfe55857481bb7c5bc6d2bce2a7580c6..c991f20158ba5da57912582539dfe7454d1c69af 100644 GIT binary patch delta 7008 zcmZ8`1yEFB_x>(RcXtR%htf#b(jW>bogyMFotF@$Ye7P~q`PyG78Vd`iIwg~dikR> z|KEJyckjG2=gfJ}z2`pXecwCtJh4&WFEL;OZFLAbISBjyu5$N?C*T649xKX`e_X0& z^4P0s9i(KzE#TNB#|`CRjiBJQq@rVLZT9sSQOucAA;-OwWeEso%07Cwi9V|FW?|>! zMH5VPW7u~j^<<}PUN_>k=KHg_w-H$0hRA{#kKr$_PlkG_N$1UD_-30GH(Ru^5OdC>@}J?K3uK>Vm{^=Jkwd z_^b?BoOlp1^?6-W9F~^Vbyg$Pq3%f$8{{t5D^JN*$`HW*me{Y8@3)ObHb2gX`+VNy zwrD&%^JSRT&nyN|TK%OP@m|+?KgFtoYAkcqxS{n2p z7umfn=lJ@)lkIEG+Q(?mAQ0F09<@Ojml*#Hf4o|ve}*8P2qLooOT*jnMk(Qp$L=JzmyUW!q~SFk_h+iIYDj_(H9}G~MCl;fraJ$H zmC6HIdAbHl6^-S5Sq&8}m0+BlM~|?uebGKB*s7-$#-*=+_?ch)>7l`K zv0KOa-MQKR@zNci)0^d~x=P<$rIy=a;7+>1XSJl;CIF?i75k|Kbq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HM9a1_1Ea2>ulT z0C@jd@wE2>`FPsed+}I%dfEQXhy%d+C+aWO)sR>s6bJzPHOl{B-=tY7u>aNT)8ZAV zP*~DFE3ni3Md03+WM^Rm0DtYj2+Oon1$N`VRsZ|B!Trxyc{u<8TQ_SjuRrzJ+57)5 z0sp>CB>w@HN~Xc2$kL(}@htvk_;=$8{}ad|4FG5;=*e=cXe#o`Dd_0&=qmnint%7; T>3`5;GHK_EOqh;xe^>txnrrR* diff --git a/bin/classes.dex b/bin/classes.dex index 1991b02c6dcb80d91684763577a3754a8a949250..e49b01add47ea706d2dfd80648b4507b3c6955c0 100644 GIT binary patch literal 10740 zcma)C3v?XSdH(Or>_b{fUQ4#MyOOQ3EL)OoJ^TV=*~XS^V}bkttsRh@n$_+|TD+QB z@6K9Msj*2QK%fn;mPbrtDDTG!2^fe=0y#iOCX6al@(OSBtwkB=w-T2@MQ<2<4i3hP5e zn}8iaA214B2iyYO1Kbb13!DOiVWL&QYG5s}5!eK51$ux>f!)9!zy@vxo&;V8J_h~= zC_{sEU^CDMWPzK39{?wTQ$TeM(F$M(U;#G)j{vU$9|3;?YHEo(fW5#$;C|pm;Mc$@ zATXC`0k96(2@C;O1K$B22Yw2?4}1pv8HgYsoxmR85bzlAI`Abhw~lB7um>0g?g5Sg z9{~Rf{0<}*4fquJJ@5zM6!0g2 z<`b!a4+sD=fTh4CKre75a21dN#(;ysw}HO{?gJhMo&}xyaD_I_z3s}_#;qW zPc#c?0G0vkfNj7Pz%XC~*8_I}4+F=57lD_6*MK*HcYzOpkAP2sKLB3=fdz;SGy?6w z8lV%{4n%=IAOQ>kBR~$g2Dk@!7WgUfCh$J+kHE*kXTX00e+2#vs12AqKn+k2EC$v9 z+kq%B26@)Of2;eo`1Ymj7Vqgid z6leijfi|EWSPrZJRsySl^MLb#)xZV78lVGM3#*W&;@J)HUnFLi-4^_ zH*hg<3D5&v2_%7iKnfTEOo02HzbahjZX}@G<&T1&30?&rb$Or52SKqV(bJI60_9jQ zfS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Yd(+qc+V<%Chr+J!@uK@ro~m!Z{c}%D z(De)!KhE&-#$wHLw@)ScKdw0+UA=foy6zX9WmRI6b{z`(eBP>SrOov}=CYd)Jbi2W zM_coGuHKoIlP;Rgzg*N6|M%=1FHe3Ik-SY&Y4sO3iEUZ4bW2M0xve4d7aaZDKCS9P zkbmaMZ*x9xJ@fyu(Vsu{)hy6>XM;riW;Uh>W@cat*qq4vlNHQ}<=)H>W(Z50v4I&r zisw0aQBuid4J{Lp)Z} + android:layout_height="wrap_content" android:text="SSLDroid service control" android:gravity="center" android:textSize="20sp" android:padding="20dp"/> \ No newline at end of file diff --git a/src/hu/blint/ssldroid/SSLDroid.java b/src/hu/blint/ssldroid/SSLDroid.java index d40ea04..9616e34 100644 --- a/src/hu/blint/ssldroid/SSLDroid.java +++ b/src/hu/blint/ssldroid/SSLDroid.java @@ -10,6 +10,7 @@ import android.widget.Toast; public class SSLDroid extends Service { final String TAG = "SSLDroid"; + TcpProxy tp; @Override public void onCreate() { @@ -29,11 +30,11 @@ public class SSLDroid extends Service { Toast.makeText(this, "SSLDroid Service Created", Toast.LENGTH_LONG).show(); Log.d(TAG, "onCreate"); - TcpProxy tp = new TcpProxy(); + tp = new TcpProxy(); try { tp.serve(listenPort, targetHost, targetPort, keyFile, keyPass); } catch (Exception e) { - Toast.makeText(this, "SSLDroid Sulyos Errorhiba" + e.getMessage(), Toast.LENGTH_LONG).show(); + Log.d(TAG, "SSLDroid Sulyos Errorhiba" + e.getMessage()); } } @@ -44,23 +45,6 @@ public class SSLDroid extends Service { @Override public void onDestroy() { + tp.stop(); } } - -/*public class SSLDroid -{ - - public static final int listenPort = 9999, // port to listen on - targetPort = 443; // port to connect to - public static final String targetHost = "sogo.balabit.com"; //remote host - static String keyFile = "/home/blint/vpn/blint-imaps.p12"; - static String keyPass = "titkos"; - - public static void main(String[] args) { - TcpProxy tp = new TcpProxy(); - try { - tp.serve(listenPort, targetHost, targetPort, keyFile, keyPass); - } catch (Exception e) { - } - } -} */ diff --git a/src/hu/blint/ssldroid/TcpProxy.java b/src/hu/blint/ssldroid/TcpProxy.java index deced37..2e1483d 100644 --- a/src/hu/blint/ssldroid/TcpProxy.java +++ b/src/hu/blint/ssldroid/TcpProxy.java @@ -14,6 +14,7 @@ import javax.net.ssl.SSLSocket; import javax.net.ssl.SSLSocketFactory; import android.util.Log; +import android.widget.Toast; /** * This is a modified version of the TcpTunnelGui utility @@ -26,6 +27,7 @@ public class TcpProxy { int tunnelPort; String keyFile, keyPass; Relay inRelay, outRelay; + Thread server = null; public TcpProxy() { } @@ -61,7 +63,7 @@ public class TcpProxy { public static final SSLSocketFactory getSocketFactory(String pkcsFile, String pwd) { if (sslSocketFactory == null) { try { - KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("SunX509"); + KeyManagerFactory keyManagerFactory = KeyManagerFactory.getInstance("X509"); KeyStore keyStore = KeyStore.getInstance("PKCS12"); keyStore.load(new FileInputStream(pkcsFile), pwd.toCharArray()); keyManagerFactory.init(keyStore, pwd.toCharArray()); @@ -71,10 +73,11 @@ public class TcpProxy { } catch (FileNotFoundException e) { Log.d("SSLDroid","Error loading the client certificate file:" + e.getMessage()); + //Toast.makeText(none, "SSLDroid Sulyos Errorhiba" + e.getMessage(), Toast.LENGTH_LONG).show(); } catch (KeyManagementException e) { Log.d("SSLDroid","No SSL algorithm support: " + e.getMessage()); } catch (NoSuchAlgorithmException e) { - Log.d("SSLDroid","Exception when setting up the Naive key management."); + Log.d("SSLDroid","No common SSL algorithm found: " + e.getMessage()); } catch (KeyStoreException e) { Log.d("SSLDroid","Error setting up keystore:" + e.getMessage()); } catch (java.security.cert.CertificateException e) { @@ -92,19 +95,19 @@ public class TcpProxy { final TcpProxy ttg = new TcpProxy(listenPort, tunnelHost, tunnelPort, keyFile, keyPass); // create the server thread - Thread server = new Thread() { + server = new Thread() { public void run() { ServerSocket ss = null; try { ss = new ServerSocket(ttg.getListenPort()); + Log.d("SSLDroid","Listening for connections on port " + ttg.getListenPort() + " ..."); } catch (Exception e) { - Log.d("SSLDroid", e.getMessage()); + Log.d("SSLDroid", "Error setting up listening socket: " + e.getMessage()); //e.printStackTrace(); System.exit(1); } while (true) { try { - Log.d("SSLDroid","Listening for connections on port " + ttg.getListenPort() + " ..."); // accept the connection from my client Socket sc = ss.accept(); Socket st; @@ -113,7 +116,7 @@ public class TcpProxy { st = (SSLSocket) getSocketFactory(ttg.getKeyFile(), ttg.getKeyPass()).createSocket(ttg.getTunnelHost(), ttg.getTunnelPort()); ((SSLSocket)st).startHandshake(); } catch (Exception e) { - Log.d("SSLDroid","SSL FAIL!\n" + e.toString()); + Log.d("SSLDroid","SSL failure: " + e.toString()); st = new Socket(ttg.getTunnelHost(),ttg.getTunnelPort()); } @@ -126,6 +129,9 @@ public class TcpProxy { fromBrowserToServer.start(); fromServerToBrowser.start(); + if (server.isInterrupted()) + ss.close(); + } catch (Exception ee) { Log.d("SSLDroid","Ouch: "+ ee.getMessage()); //ee.printStackTrace(); @@ -136,6 +142,11 @@ public class TcpProxy { server.start(); } + public void stop(){ + if (server != null) + server.interrupt(); + } + public static class Relay extends Thread { private InputStream in; private OutputStream out; @@ -151,9 +162,6 @@ public class TcpProxy { int n = 0; try { - //System.err.println( - // "\n\n=== START OF A TRANSMISSION : " + dateFormat.format(new Date()) + " =======================================\n"); - while ((n = in.read(buf)) > 0) { out.write(buf, 0, n); out.flush(); @@ -162,28 +170,26 @@ public class TcpProxy { if (buf[i] == 7) buf[i] = '#'; } - - //String msg = new String(buf, 0, n); - //System.out.println(prefix + " : " + msg.length()); - //System.err.println(msg); + + if (Thread.interrupted()) { + //We've been interrupted: no more serving. + return; + } } } catch (SocketException e) { + Log.d("SSLDroid", e.getMessage()); } catch (IOException e) { Log.d("SSLDroid", e.getMessage()); - //e.printStackTrace(); } finally { try { in.close(); out.close(); } catch (IOException e) { Log.d("SSLDroid", e.getMessage()); - //e.printStackTrace(); } } - //System.out.println("Quiting stream proxy " + prefix + "..."); + Log.d("SSLDroid", "Quitting stream proxy..."); } } - - //private static final Format dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss,SSS"); } \ No newline at end of file