From 8a53a94f2e2890cb8d057c62c31456e8840049fb Mon Sep 17 00:00:00 2001 From: timwr Date: Fri, 12 Apr 2013 18:35:03 +0100 Subject: [PATCH 01/10] android meterpreter --- java/androidpayload/app/AndroidManifest.xml | 38 ++++++++ java/androidpayload/app/pom.xml | 77 +++++++++++++++ .../app/res/drawable-mdpi/icon.png | Bin 0 -> 3150 bytes java/androidpayload/app/res/layout/main.xml | 13 +++ .../androidpayload/app/res/values/strings.xml | 4 + .../src/com/metasploit/stage/LoadStage.java | 56 +++++++++++ .../com/metasploit/stage/MainActivity.java | 59 ++++++++++++ java/androidpayload/build.sh | 25 +++++ .../library/AndroidManifest.xml | 15 +++ java/androidpayload/library/pom.xml | 61 ++++++++++++ .../library/res/layout/main.xml | 13 +++ .../library/res/values/strings.xml | 4 + .../src/androidpayload/stage/Meterpreter.java | 51 ++++++++++ .../src/androidpayload/stage/Shell.java | 25 +++++ .../src/androidpayload/stage/Stage.java | 44 +++++++++ .../meterpreter/AndroidMeterpreter.java | 88 ++++++++++++++++++ .../stdapi_fs_file_expand_path_android.java | 10 ++ ...api_sys_process_get_processes_android.java | 46 +++++++++ .../android/webcam_audio_record_android.java | 50 ++++++++++ .../android/webcam_get_frame_android.java | 52 +++++++++++ .../android/webcam_list_android.java | 58 ++++++++++++ .../android/webcam_start_android.java | 42 +++++++++ .../android/webcam_stop_android.java | 28 ++++++ .../meterpreter/CommandManager.java | 9 +- .../metasploit/meterpreter/Meterpreter.java | 25 +++++ .../stdapi_sys_process_get_processes.java | 2 +- java/pom.xml | 2 + 27 files changed, 893 insertions(+), 4 deletions(-) create mode 100644 java/androidpayload/app/AndroidManifest.xml create mode 100644 java/androidpayload/app/pom.xml create mode 100644 java/androidpayload/app/res/drawable-mdpi/icon.png create mode 100644 java/androidpayload/app/res/layout/main.xml create mode 100644 java/androidpayload/app/res/values/strings.xml create mode 100644 java/androidpayload/app/src/com/metasploit/stage/LoadStage.java create mode 100644 java/androidpayload/app/src/com/metasploit/stage/MainActivity.java create mode 100755 java/androidpayload/build.sh create mode 100644 java/androidpayload/library/AndroidManifest.xml create mode 100644 java/androidpayload/library/pom.xml create mode 100644 java/androidpayload/library/res/layout/main.xml create mode 100644 java/androidpayload/library/res/values/strings.xml create mode 100644 java/androidpayload/library/src/androidpayload/stage/Meterpreter.java create mode 100644 java/androidpayload/library/src/androidpayload/stage/Shell.java create mode 100644 java/androidpayload/library/src/androidpayload/stage/Stage.java create mode 100644 java/androidpayload/library/src/com/metasploit/meterpreter/AndroidMeterpreter.java create mode 100644 java/androidpayload/library/src/com/metasploit/meterpreter/android/stdapi_fs_file_expand_path_android.java create mode 100644 java/androidpayload/library/src/com/metasploit/meterpreter/android/stdapi_sys_process_get_processes_android.java create mode 100644 java/androidpayload/library/src/com/metasploit/meterpreter/android/webcam_audio_record_android.java create mode 100644 java/androidpayload/library/src/com/metasploit/meterpreter/android/webcam_get_frame_android.java create mode 100644 java/androidpayload/library/src/com/metasploit/meterpreter/android/webcam_list_android.java create mode 100644 java/androidpayload/library/src/com/metasploit/meterpreter/android/webcam_start_android.java create mode 100644 java/androidpayload/library/src/com/metasploit/meterpreter/android/webcam_stop_android.java diff --git a/java/androidpayload/app/AndroidManifest.xml b/java/androidpayload/app/AndroidManifest.xml new file mode 100644 index 00000000..8c92c0e9 --- /dev/null +++ b/java/androidpayload/app/AndroidManifest.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/java/androidpayload/app/pom.xml b/java/androidpayload/app/pom.xml new file mode 100644 index 00000000..754cd79c --- /dev/null +++ b/java/androidpayload/app/pom.xml @@ -0,0 +1,77 @@ + + + 4.0.0 + com.metasploit + Metasploit-AndroidPayload + 1-SNAPSHOT + apk + AndroidPayload for Metasploit + + + + com.google.android + android + 1.6_r2 + provided + + + + ${project.artifactId} + src + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + 3.5.3 + + true + + + + + + com.jayway.maven.plugins.android.generation2 + android-maven-plugin + + + + 3 + + + + + + + + + deploy + + + + maven-antrun-plugin + 1.7 + + + package + + run + + + + + + + + + + + + + + + + + + + diff --git a/java/androidpayload/app/res/drawable-mdpi/icon.png b/java/androidpayload/app/res/drawable-mdpi/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..f608fb8b15b96d704188da8ac82fd05acf941783 GIT binary patch literal 3150 zcmV-U46*ZxP)Px#24YJ`L;(K){{a7>y{D4^000SaNLh0L01FcU01FcV0GgZ_00007bV*G`2ipV% z12r{(x2SRe01M7ZL_t(&-p!eNj2+c|$3MSwX6~K6cOPEwVz7bujY>#^Xp*Y0Kor_a zRgfAfYAZ!eBT-dNl?Q5~v<<2%Xh>42A#Rh<652w6lq57L2}MPPfJ1;_*5(bi!8O>s zi*4++*Y@7$%sJ=RKW6UTy}Nh44na|mbToJ7&dmA#UfPLoim0M07BK@D-7L}YW(nacf+x6i3NaIsHXc{? zKL&laaFGr``3NF^i!mF-m^@&NMT`N-k7^8J3ScrHD0$pSabF5il)Iq;Rf9-CRrA0J zIaoqKH539X5|=L|N-iWB`Vii|p?d6A)Ljcw05s+zjM*U8qGHK{cC-ox1i^?NssRZK1jHy=<_H=ffQG^agJMxc3=)^mB`RM=$eE)6Xj3s3 zH5M_JY7%3j2*iRl7-Mi48fl<1P{I`26>D>#g$7ju(oRrvfEq&Xc0Pax(ljL)Lpds= zA*Ue?zI)UVIu6(DP+KG-4E)w#g0Z9?)(ltpr)z$f&Ffa@@g;&Fq&{%NJ-hh9uGd&K zln}?!0)T*tP~!;&zz_oJ10i_CdusItt4D^o;g7Cl(|Mz$naho&%1|ZYt9L)d_a4|u zshXh1knMd)=7U5mVj@Hp8^^qJ^LcDOZ*)m$-}dp}*{0vvYOUoHNEvANy^tdiNGund_2^sLq*^XhiVJfagIbTz5<&pyJkEPg)tkI+?Koe*`u$vS z$py^JHGBA5Rf(gB%m=V0XABkr6k`Mv?A zBzI(4f)9{oo)dE|Hm)7#D}VT_{MwdtIZVk4`oCGOn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hDe5!SyL{2$dq{pEP2}e6+~-j5z-9S0Rfekx4?Mk}uYBhbVoSak)Hpfmr=S0~ zKGh5~AH1=qS^8PLpHb%+h~bV0pW}w_?#!Ll2a$PaebeG8S>=Yi zf5OcVyg(_oSf8P3i;$&gmgUunTX6LA$1bRaGs_q(8>Uap@n_q<$HA#1B;}Z(f%jw8fa+|*MyX0JZ+ zxgr@aVRO6K%-t^Tl^;#STP~kec%KzXjL;1P>E!ONhKiXs(B|phNDts*$zlKVx;Y zr@r`BV$pW}kU#qJpSS}P-#*)-$o7fkzQeux_;I`T;`_1XG0@BC?A|W~>rynWL(ut8 z52|2F=&3_bg(JH^>L#Chq@NO&n=6{Q2jszB4H3ED46jX5eQ&vZss*pFF zocvEe{p=t6WBd2L*^huf?K2F#|1%#%?B64-@9qXDK|3+(S~Wd=cw4sr(J$b$ z@Mh}Xl{6^Jg};04iM{sxOMi&i4QSZf&DB{m2iG|9VmS2tC*9<(f9*%WZx-NLZZYJ; zPwt$N>e#)eJX8aI37;jJHrrwL;B9*P$e;QnyPsJ>*cGP$@z2_RnAICh>EaK35ZC(s obpK=9wR!xTTAyjW6%Ez@0S7TX7|^&iVE_OC07*qoM6N<$g4!zxmH+?% literal 0 HcmV?d00001 diff --git a/java/androidpayload/app/res/layout/main.xml b/java/androidpayload/app/res/layout/main.xml new file mode 100644 index 00000000..4fd72001 --- /dev/null +++ b/java/androidpayload/app/res/layout/main.xml @@ -0,0 +1,13 @@ + + + +