Slashdot Log In
Java-Based x86 Emulator
Posted by
kdawson
on Sat Mar 24, 2007 04:05 PM
from the DOS-you-say dept.
from the DOS-you-say dept.
jaavaaguru writes "Researchers at Oxford University have produced a Java-based x86 emulator that they hope will be useful in testing applications and learning about viruses without damaging the host, utilizing the robust sandboxing that Java provides. They have an online demo available that boots DOS and has some games to play. Being purely Java, this emulator should be able to run on almost anything, including cell phones." The code is not yet available outside the Oxford community; the developers are said to be working on a suitable general license. In the meantime the code can be licensed on a case-by-case basis.
This discussion has been archived.
No new comments can be posted.
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Interesting, but (Score:5, Funny)
(http://127.0.0.1/ | Last Journal: Saturday August 04, @07:40AM)
Still, I'd love to tinker with this from a 'gee whiz' standpoint.
Re:Interesting, but (Score:5, Interesting)
(http://qism.blogspot.com/)
If it's hard to get good emulation speed in C++, it's even harder in Java.
can you run java in the x86? (Score:5, Interesting)
(http://emulemorph.sourceforge.net/)
Just like the old days when you ran windows real mode under a windows 386 mode windows.
Re:can you run java in the x86? (Score:4, Funny)
Re:can you run java in the x86? (Score:5, Funny)
...written in XSLT.
Re:can you run java in the x86? (Score:5, Funny)
The next step is to get rid of hardware altogether.
Re:Interesting, but (Score:5, Funny)
(http://www.ganjablogger.com/ | Last Journal: Thursday January 05 2006, @05:36PM)
And with them it can perform almost as fast as C in some fringe cases.
Re:Interesting, but (Score:5, Insightful)
Re:Interesting, but (Score:4, Insightful)
So... (Score:5, Funny)
(http://diuf.unifr.ch/pai/)
How's the efficiency? (Score:2, Interesting)
(http://shock-horror.com/)
On, say, a mobile phone (which is mentioned by the site as a possible use) would there be enough processing grunt to do anything useful? I know Java's not as slow as some people would have you believe, but virtualisation requires as much speed to be squeezed out as possible to be usable.
On a desktop, what advantage does this have over the existing virtualisation options which don't have to deal with the Java environment?
Well for one (Score:5, Interesting)
(http://www.keirstead.org/)
I'd like you to point me to the support page for VMWare on SPARC... oh wait that's cause there isn't one. QEMU can't even run most applications on a SPARC.
And forget about ARM.
I think this is great. Java is not as slow as people seem to think it is. One thing Java 5 (and 6) have that actually benefits virtualization is dynamic recompilation... the JVM knows the instruction sdequences better than the original author, and in theory can optimize the code paths in ways writing a virtualizer in assembly or C++ can not.
Re:Well for one (Score:5, Informative)
Under the Java control applet, under the General tab, click "Settings..." under "Temporary Internet Files". Then click "View Applets...". It will take a moment to load (or in my case, 2-3 minutes). Then UNcheck "Enable Caching". Firefox now starts my applets almost instantly. This doesn't affect downloaded Java applications such as Azureus or Eclipse (both of which I use extensively).
Hope this helps.
Re:How's the efficiency? (Score:5, Insightful)
(http://www.slamb.org/)
Well, that's great, but you can already do that with VMware, Parallels, QEMU, or other virtualization tools. Sure, virtualization requires the same host and guest architecture, but we all have plenty of x86 machines sitting around, and near-native speeds are necessary to actually boot Windows Vista before the sun goes supernova. So while this is neat software, it's not as suitable for malware researchers as what they are already using. The JPC project needs to find a different niche.
Re:How's the efficiency? (Score:4, Informative)
(http://kestas.kuliukas.com/)
Two great tastes (Score:1)
(http://slashdot.org/)
What's next? A Windows emulator written in Intercal?
What's wrong with virtualisation? (Score:1, Flamebait)
Java x86 emulator speed (Score:5, Funny)
(http://slashdot.org/~christurkel/journal | Last Journal: Monday March 05 2007, @02:21PM)
Java+DOS: Snail with ball and chain
Java+DOS on non x86: Snail nailed to the table
So it runs DOS eh? (Score:5, Funny)
Why did they use Java? It would have been faster in C++.
I for one welcome our new old x86 overlords.
Did I miss any?
Re:So it runs DOS eh? (Score:4, Funny)
(http://www.weather.com/weather/local/46394)
java me is not java se (Score:2)
(http://www.livejournal.com/users/sinistertim101 | Last Journal: Saturday March 24 2007, @12:32PM)
But still cool though.
What do you do when it crashes? (Score:3, Insightful)
(http://ctho.ath.cx/)
on a good Java runtime... (Score:2, Insightful)
Oh No (Score:1)
(Last Journal: Wednesday April 18 2007, @12:56PM)
Commander Keen! (Score:1)
They've got Commander Keen!
Java isn't slow anymore (Score:1, Interesting)
(http://www.bitstorm.org/edwin/en/)
Keyboard Layout change hangs (Score:1)
(http://www.jawtheshark.com/ | Last Journal: Saturday November 03, @08:32AM)
The first thing I typed at the prompt was "keyb sf" and it hangs... Great...
I can use the US layout, that's not it, but I prefer to see the letters on my keyboard when I type.
Other projects doing the same/faster thing.. (Score:3, Informative)
(http://www.cs.man.ac.uk/)
http://binarytranslator.org/ [binarytranslator.org]
There are attempts to integrate this into the JNode open source Java OS to make a JNode/GNU stack.
There is also the VEELS/JXEmu system:
http://nil.ics.uci.edu/~gal/?page=VEELS [uci.edu]
which appears not to be publicly available.
My intepretation (Score:5, Funny)
(http://excelcia.org/)
For an encore, perhaps they can write a JVM in BASIC.
WARNING: Performance implosion imminent due to recursive interpretation.
license (Score:2)
(http://pms.colonpee.com/ | Last Journal: Saturday January 27 2007, @04:52AM)
Why not Simics? (Score:2, Informative)
Can someone explain the advantages of the Java based x86-emu in TFA over something like Simics?
I tried the demo, but it didn't work (Score:2)
The demo started up okay, booting and getting to an A: prompt. But it wouldn't accept keyboard focus so I couldn't enter any instructions to run any of the games.
I contacted the project to let them know. They responded that I probably need to upgrade to Java 1.6 to insure keyboard focus. It's also possible that one of my Firefox extensions might have interfered. They said they have tested JPC with Firefox and Linux but not with Kubuntu specifically.
I was surprised that the startup worked fairly well. There is a very long delay while the Java applet loads and I thought Firefox had frozen, but eventually it started up rather well.
Java is fine for emulation (Score:2)
Just give this project time. Everybody is queuing up to knock it down, but it should be fine. They're not planning to put Vista on it, just emulate some DOS data entry applications.
What is the point? (Score:2)
(http://00f.net/)
Viruses also need OS system calls to do the job. Unless there's also a full Windows emulation in Java (including the Windows bugs and vulnerabilities viruses depend on), how could this be used to analyze how viruses are working? And even if it was the case, what would be the point over QEmu?
If you need to understand what some piece of code is doing, there are tools called debuggers.
Wait for the lawsuits... (Score:2)
(http://stage6.divx.com/)
You probably wouldn't see the likes of Intel suing x86 emulators running on x86 (e.g. virtual machines), but it might be a different story if people start using x86 emulators on other CPU architectures through a Java VM because that cuts into their business.
Not fully functional (Score:1)
Slow (Score:2)
(http://andreywarkentin.livejournal.com/)
Also, for something that's is apparently non-FOSS, they seem to be using both the BOCHS BIOS and the VGA ROM BIOS.... Now the VGA code is AFAIK LGPLd, so they should be okay unless they modified it (a possibility) but I'm pretty sure they had to modify the stock Bochs BIOS, unless they emulated Bochs. In either case, the Bochs BIOS is GPLd.
Run using your own floppy/hd images... (Score:1, Informative)
(1) Download jar from "http://www.physics.ox.ac.uk/jpc/JPCAppletObfs.ja
(2) Execute using the following java command line:
> java -classpath JPCAppletObfs.jar org.jpc.j2se.PCMonitor
Also the jar archive contains the floppy and HD images, so you can replace them with your own:
> unzip -l JPCAppletObfs.jar
. . .
38400 03-16-07 16:07 vgabios.bin
65536 03-16-07 16:07 bios.bin
10485760 03-16-07 16:07 dosgames.img
1474560 03-16-07 16:07 floppy.img
. . .
13756027 285 files
I tried replacing the floppy.img with a freesco.org linux image, but it failed to boot complaining about missing instructions. I'm guessing it only does the 8086 ISA.
Cool thing. (Score:1)
Won't accept all keystrokes (Score:2)
The next step (Score:2)
(This is cynicism - I'm not being too serious.)
Quite interesting (Score:2)
(http://www.geocities.com/orion_blastar/contact/ | Last Journal: Tuesday April 03 2007, @07:19PM)
I understand that until they are able to fully emulate certain hardware than this could be limited to just DOS programs. I think they at least out to be able to emulate a S3 Virge video card, Sound Blaster 16, Intel Chipset network card, and maybe serial ports with a Hayes compatible modem in order to run some older Windows operating systems in it using a virtual hard drive. Yet until they can at least do some of the GeForce or ATI Radeon virtual graphics cards, it will be hard to do XP and Vista and modern video games.
Just like the old Mac OS (Pre OSX) emulated a 680X0 CPU in software it took a while before PowerMac hardware caught up to allow the 680X0 emulation to be at a decent speed. A pity the same cannot be done to Intel Macs to emulate PowerPC and 680X0 cpus in software because of the big-endian little-endian differences. Although ARDI tried the 680X0 software CPU emulation in Executor they found that trying to do the same for a PowerPC CPU emulation was not as fast.
Still a Java based X86 emulator opens up a lot of possibilities, due to the fact that Java uses a sandbox and if the Java X86 virtual machine gets infected, chances are the host OS won't get infected even if it is a X86 system itself. It could be a good way to study viruses, without risking the host machine.
Is Java slow? (Score:1)
This is... (Score:1)
(http://hub.jonathan-rothwell.co.uk/ | Last Journal: Thursday August 24 2006, @09:13AM)
This really shows that FLASH is slow... (Score:2)
(http://dwedit.home.comcast.net/)
Licence - Lemmings etc. (Score:2)
(http://bware.iware.co.uk/)
It could be useful . . . (Score:1)
(http://www.brainlink.com/)
Typical Oxford NIH? (Score:1)
So as usual, if it hasn't been fiddled with by Oxonians, it doesn't exist yet... but then they write their own dictionary too, you know.
Java is like XML... (Score:2)
(http://www.faqs.org/rfcs/rfc3675.html)
Re:Struggling to understand... (Score:2)
(http://127.0.0.1/ | Last Journal: Saturday August 04, @07:40AM)
Re:Comparisons to other emulators? (Score:3, Insightful)
(http://127.0.0.1/ | Last Journal: Saturday August 04, @07:40AM)
Re:Ah, a Java-based x86 emulator... (Score:2, Informative)
Although I would smile if they installed Windows 3.1 and the thing dropped into dosshell when you exited. Of course many licensing things there. I guess there is no licensing issues showing off a product you are trying to license with shareware titles, is there?
Re:On a phone? (Score:2)
Re:Can I conclude: Survive /. effect = robust (Score:3, Insightful)
Re:Struggling to understand... (Score:1)
(http://blog.gauner.org/)
Why Java ? (Score:2)
(http://www.sympato.ch/)
I don't. What does Java has to offer that some standard C emulator doesn't ?
Some of the current emulators provides special hooks so the emulated code can ask the emulator to perform some task for acceleration (like some emulators provide special graphic and network drivers for the emulated Windows).
But if you cut them, there are no differences between the emulator and a real machine from the virus' point of view.
If the emulator is well done enough there won't be any exploit that the virus could use to make the emulators's host run arbitrary code.
Or are they using Java just because they want not to need to do extra efforts to be sure the virus won't easily escalate out of the emulator ?
Re:lame description (Score:1)