Jump to content



Photo

Scan all drives for autorun.inf


  • Please log in to reply
10 replies to this topic

#1 AutoProgramming

AutoProgramming

    Seeker

  • Active Members
  • 37 posts

Posted 06 April 2009 - 04:55 PM

AutoIt         
;~ scan all drives for autorun.inf #include <ButtonConstants.au3> #include <EditConstants.au3> #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #Region ### START Koda GUI section ### Form=C:\Users\alexander\Documents\AutoIt\projects\AntiVir\Forms\autorun_editor.kxf $Form1 = GUICreate("Autorun.inf Scanner // by AutoProgramming", 635, 444, 193, 125) $Edit1 = GUICtrlCreateEdit("", 8, 40, 617, 393) $CButton = GUICtrlCreateButton("Close", 8, 8, 75, 25, 0) $IButton = GUICtrlCreateButton("Search for autorun.inf", 96, 8, 131, 25, 0) $RCheckbox = GUICtrlCreateCheckbox("Search Removable Drives?", 240, 16, 169, 17) GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1     $nMsg = GUIGetMsg()     Switch $nMsg         Case $GUI_EVENT_CLOSE             Exit                     Case $IButton             GUICtrlSetData($Edit1, "")                         If GUICtrlRead($RCheckbox) = 1 Then                 GetAll("removable")             EndIf                         GetAll("fixed")             GetAll("cdrom")                     Case $CButton             Exit     EndSwitch WEnd GetAll("fixed") GetAll("cdrom") Func GetAll($type)     $var = DriveGetDrive($type)     If NOT @error Then             For $i = 1 to $var[0]             $path = $var[$i] & "\autorun.inf"                         If FileExists($path) Then                 GUICtrlAddData($Edit1, "--------------------------------------------------" & @CRLF)                 GUICtrlAddData($Edit1, "Autorun.inf @ " & $path & @CRLF)                 GUICtrlAddData($Edit1, "--------------------------------------------------" & @CRLF)                 $autorun = FileRead($path)                 GUICtrlAddData($Edit1, $autorun)                 GUICtrlAddData($Edit1, @CRLF & @CRLF)             EndIf         Next     EndIf EndFunc Func GUICtrlAddData($GUIElement, $Data)     GUICtrlSetData($GUIElement, GUICtrlRead($GUIElement) & $Data) EndFunc


I think it's quite self-explainig -> This tool searches for autorun.inf in all drives and displays its content. Enjoy.
My OpenSource Projects:- [BEEP] proMusiX- Search autorun.inf





#2 Yashied

Yashied

    Happy in Moscow

  • MVPs
  • 2,512 posts

Posted 06 April 2009 - 05:05 PM

It's a good idea. Suitable for finding viruses on flash drives.

:D

#3 DaRam

DaRam

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 399 posts

Posted 06 April 2009 - 05:15 PM

Excellent idea, it can be used to defeat the effort going on here http://www.autoitscript.com/forum/index.ph...c=92643&hl= :D

It's a good idea. Suitable for finding viruses on flash drives.



#4 A. Percy

A. Percy

    VW Sedan user

  • Active Members
  • PipPipPipPipPipPip
  • 561 posts

Posted 06 April 2009 - 07:10 PM

unless you have disabled the autorun function before, it may not be effective. Like that question: which came first, the chicken or the egg?
Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

Posted Image VW Bug userPosted Image

Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

#5 AutoProgramming

AutoProgramming

    Seeker

  • Active Members
  • 37 posts

Posted 06 April 2009 - 08:04 PM

Excellent idea, it can be used to defeat the effort going on here http://www.autoitscript.com/forum/index.ph...c=92643&hl= :D


That's actualy where the idea comes from ;D
My OpenSource Projects:- [BEEP] proMusiX- Search autorun.inf

#6 GEOSoft

GEOSoft

    Sure I'm senile. What's your excuse?

  • MVPs
  • 10,563 posts

Posted 06 April 2009 - 08:14 PM

unless you have disabled the autorun function before, it may not be effective. Like that question: which came first, the chicken or the egg?

If AutoRun is disabled, it won't matter if the AutoRun.inf file exists or not.
GeorgeQuestion about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number.Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else."Old age and treachery will always overcome youth and skill!"

#7 A. Percy

A. Percy

    VW Sedan user

  • Active Members
  • PipPipPipPipPipPip
  • 561 posts

Posted 06 April 2009 - 08:27 PM

If AutoRun is disabled, it won't matter if the AutoRun.inf file exists or not.


But if isn't, it won't matter if you can see the contents of autorun.inf or not, your machine is infected if the file have bad content.
Só o que posso lhe dizer, bom é quando faz mal!My work:Au3Irrlicht - Irrlicht for AutoItMsAgentLib - An UDF for MSAgentAu3GlPlugin T2 - A 3D plugin for AutoIt...OpenGl Plugin - The old version of Au3GlPlugin.MAC Address Changer - Changes the MAC AddressItCopter - A dragonfly R/C helicopter simulator

Posted Image VW Bug userPosted Image

Pinheiral (Pinewood) city: http://pt.wikipedia.org/wiki/Pinheiral

#8 killerofsix

killerofsix

    Wayfarer

  • Active Members
  • Pip
  • 63 posts

Posted 06 April 2009 - 10:03 PM

glad to see I inspired something :o
But for most PC's autorun is disabled and only appears as an option. For my USB finder it's just another way to lure the person who has your USB to run your app. This is a good defense against any malicious attempts to destroy your system through a usb or cd. good job with this script :D
"The quieter you are, the more you are able to hear..."Posted ImageMy AppsUSB Finder

#9 rajeshontheweb

rajeshontheweb

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 382 posts

Posted 07 April 2009 - 07:49 PM

guys, i thought i had posted my edited version of the autorun finder ?? i will post the mod tomoro :-)

#10 rajeshontheweb

rajeshontheweb

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 382 posts

Posted 08 April 2009 - 05:39 AM

Here it is ,

> shows which drives user has scanned already - as a confirmation that the program has run already :-)
> alerts user if the drive was not ready (typically if the memory card / zipdrive / removable media not inserted properly )
> Selects removable media also by default
<edited>
> search button on default focus

Attached Files


Edited by rajeshontheweb, 08 April 2009 - 06:57 AM.


#11 rajeshontheweb

rajeshontheweb

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 382 posts

Posted 08 April 2009 - 06:52 AM

Added Features:
> Edit Control is read only,
> If autorun.inf is a folder (typically ninja pendisk / flashdisinfector / myown driveprotection script, do that for security enabling on removable drives) lists folder contents.

Attached Files






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users