NXT Virus

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

NXT Virus

Post by muntoo »

Well, technically, this isn't a "virus" by definition, but it is the first piece of "malicious" code for the NXT, specifically targeting the NBC/NXC Enhanced Firmware:

Code: Select all

/*  Program Name: "! Startup.nxc"
**  This program was created by "muntoo" on November 7, 2010
**  Created using BricxCC (by John Hansen) and written in NXC (by John Hansen)
**  ( http://bricxcc.sourceforge.net/ )

Description:
MUHUHAHAHAHAHAHAHAHAHAHAHAHAHAHA!!!
*/


task main()
{
	PowerDown();
	RebootInFirmwareMode();
}
I was dumb enough to download this to my NXT. I thought I could fix it by redownloading the firmware... but that doesn't seem to work.

Any ideas on how to remove this "virus"?
Last edited by muntoo on 14 Nov 2010, 03:56, edited 1 time in total.
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
mightor
Site Admin
Posts: 1079
Joined: 25 Sep 2010, 15:02
Location: Rotterdam, Netherlands
Contact:

Re: NXT Virus

Post by mightor »

Hit the reset button for a couple of seconds and then reflash. Easy.

- Xander
| My Blog: I'd Rather Be Building Robots (http://botbench.com)
| RobotC 3rd Party Driver Suite: (http://rdpartyrobotcdr.sourceforge.net)
| Some people, when confronted with a problem, think, "I know, I'll use threads,"
| and then two they hav erpoblesms. (@nedbat)
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT Virus

Post by mattallen37 »

Actually Xander, it is not that easy. I once built a program that was basically the same thing, and it took a lot more than just holding the reset button to reset it. How I fixed it, was by holding the orange button AND the reset button for a COUPLE MINUTES. It finally did fix it. The reset button only seems to work when the NXT is powered on, so holding the orange button will keep turning it on, and holding the reset button will hopefully reset it (it FINALLY did for me). After that, I decided to NEVER download the program again.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: NXT Virus

Post by hassenplug »

This makes me happy. Someone created a virus, and caused themselves a big headache.

FYI, a few years back, someone created a virus for an RCX that would transmit itself via IR to other RCXs.

I never tried it.

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT Virus

Post by mattallen37 »

hassenplug wrote:...FYI, a few years back, someone created a virus for an RCX that would transmit itself via IR to other RCXs...
What do you mean by "transmit itself"?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
nxtreme
Posts: 246
Joined: 29 Sep 2010, 03:53
Location: 192.168.1.2

Re: NXT Virus

Post by nxtreme »

mattallen37 wrote:What do you mean by "transmit itself"?
Sort of similar to some cellphone viruses that go from phone to phone using Bluetooth. In other words, it would duplicate itself, sort of like an earthworm getting chopped in half*, growing again and repeating the cycle. Pretty soon you have lots of worms :). At least, that's how I understand it.

* Well, maybe they don't quite duplicate, just grow back.
Last edited by nxtreme on 08 Nov 2010, 16:20, edited 1 time in total.
One King to rule them all, One King to find them,
One King to bring them all and in the darkness bind them
On Earth where Shadows lie.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT Virus

Post by mattallen37 »

Oh, I get it. So what was the fix for the RCX virus? Resetting it by taking out the batteries?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
hassenplug
Posts: 346
Joined: 27 Sep 2010, 03:05
Contact:

Re: NXT Virus

Post by hassenplug »

mattallen37 wrote:Oh, I get it. So what was the fix for the RCX virus? Resetting it by taking out the batteries?
Yes. Pretty simple fix.

Found it: http://www.convict.lu/Jeunes/tiny_mini_ ... i_worm.htm

Steve
---> Link to lots of MINDSTORMS stuff under my picture --->
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: NXT Virus

Post by mattallen37 »

That looks interesting. I think I might try it someday.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
muntoo
Posts: 834
Joined: 01 Oct 2010, 02:54
Location: Your Worst Nightmare
Contact:

Re: NXT Virus

Post by muntoo »

If your fix works (I'll try it on Saturday), I'll probably make another one. ;) I'll see if there are any exploits in BT to make a worm... Of course, I'll do some pre-testing to make sure it's safe, and I'll add a safety feature (stops after 2 transmits?).

EDIT:
I'm planning something like this:

Code: Select all

count = ReadFile("counter.dat");
WriteFile("counter.dat", count++);
if(count <= 2)
{
SendFile("counter.dat");
SendFile("! Startup.rxe");
RemotePowerDown();
}
Of course, you'll need to establish a connection first. :(
Image

Commit to LEGO Mindstorms Robotics Stack Exchange:
bit.ly/MindstormsSE


Commit to LEGO Stack Exchange: bit.ly/Area51LEGOcommit
Locked

Who is online

Users browsing this forum: Semrush [Bot] and 13 guests