Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

Java 

Embedding a .exe within a .jar file - Help Requested

Currently I have a .jar file being used for a client-based game.

I would like to privately embed a .exe file within the .jar file itself so that no other user can simply JD-GUI it.

This way, when the .jar file is opened, the .exe file is executed alongside with it.

Can anyone help me with this type of problem? Thanks.
What you can do it drop the .exe inside of your jar as a resource. Then when you're ready to execute the .exe, write it as a temporary file (File.createTempFile) and execute it with Runtime.getRuntime().exec(...) or by using a process builder. You can delete the temp file when you're done with it (File#deleteOnExit()).
I apologize for my lack of knowledge in Java coding.

I am still trying to figure out how to have this happen:

1. I run my .jar file.
2. The .jar opens up as normal, but ALSO launches an .exe file as well (hidden).

I have looked everywhere and may be overlooking this situation, but if anyone could help me I'd greatly appreciate it.

Thank you guys.
Why are you doing Java programming (cross platform) if you are going to include an exe-file required for program execution (which is platform and often architecture specific)?
[Image: TEGE4Zx.png]

Puzzle level: 2/5
(Jul 18, 2015 05:27 AM)nOrr Wrote:  Why are you doing Java programming (cross platform) if you are going to include an exe-file required for program execution (which is platform and often architecture specific)?

Because he's lying and he's trying to embed a virus in to a jar file.
(Jul 19, 2015 11:03 PM)matt Wrote:  Because he's lying and he's trying to embed a virus in to a jar file.

I'm going to guess its a RAT stub in a rsps client.
(Jul 19, 2015 11:03 PM)matt Wrote:  Because he's lying and he's trying to embed a virus in to a jar file.

Far-fetched idea, but he could be opening something innocent like netcat and downloading cat pictures.
I'd suggest a simple file download and execute class. All you need is a direct link. Since I can't post links, I'll provide the pastebincom/ link:

pastebin(dot)com(slash)vG1BefTM

^^ Enjoy copying the source code for this class.


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Java] by lasermatApr 19, 2022 12:14 PM 2 251 Apr 19, 2022 12:14 PM
Last Post: _0xC_
[Java] by PanksJul 12, 2021 12:15 AM 2 169 Jul 12, 2021 12:15 AM
Last Post: CheesyBread
[Java] by royaltyyyNov 25, 2020 11:53 PM 7 268 Nov 25, 2020 11:53 PM
Last Post: royaltyyy