Skip to main content

Invisibly Execute BAT File in the Background

Invisibly Execute BAT File in the Background
============================
A hacker sometimes need to hide their script in the background, because they don't want the victim become suspicious if something popped out in their window, since any command prompt window will be visible until the .BAT/.CMD file execution is complete.

Requirement:

1. Notepad or any other text editor
How to Invisibly Execute BAT File in the Background:

1. Let say I will ping google.com by utilizing BAT script.

ping www.google.com

and then save as ping.bat

2. When we double click the ping.bat we've just created, a command prompt window will popped out and pinging google.com
and the window will automaticaly closed after the execution is complete.

3. We will utilize Windows Script Host RUN method to invisibly execute BAT file in the background. This is the script

Set WshShell = CreateObject("WScript.Shell")
WshShell.Run chr(34) & "C:\ping.bat" & Chr(34), 0
Set WshShell = Nothing

Invisibly Execute BAT File in the Background

save the script as hidden.vbs with .vbs extension.

4. I've modified the BAT script a little bit, because we need to check whether the script was successfully executed or not.

ipconfig > result.txt

all IP configuration result will be saved into result.txt file.

5. When we execute the hidden.vbs, no window popped out and if our script was successfully executed in the background, in our folder location should have a new file result.txt contained with information about windows ip configuration.

Comments

Popular posts from this blog

IBM iAccess for windows 7.1 "a system restart is pending" error

 IBM iAccess for windows 7.1 "a system restart is pending" error HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager 1. Look for the following key:  PendingFileRenameOperations or   FileRenameOperations ** 2. Right-click ->  Rename . 3. Add a prefix ### and press Enter. 4. Close regedit and attempt the installation.  Note:  Make sure to go back and remove the ### prefix. The installation should continue.

Webex always using Microphone

 Webex always using Microphone 1). Navigate to Webex settings 2). Devices - Use Ultrasound 3). Remove ticket "Use Ultrasound"

Cisco Webex - Outlook integration issue

 Cisco Webex - Outlook integration issue Close MS Outlook and Cisco Webex. Open Registry Editor (regedit.msc) and navigate to  Computer\HKEY_CURRENT_USER\SOFTWARE\IM Providers Remove  Cisco Jabber  folder and all items with name like " Cisco Jabber ". NOTE: Don't remove and don't change " Cisco Spark " folder. Close Registry Editor. Then you need to register integration .dll: Run cmd.exe  AS ADMINISTRATOR Navigate to  c:\Users\<YOUR USERNAME>\AppData\Local\Programs\Cisco Spark\dependencies Enter command  regsvr32.exe /s spark-windows-office-integration.dll Close cmd.exe Start Cisco Webex. Start MS Outlook. Check integration feature. Note :  If webex was installed from official site, then path is   с :\Users\<YOURUSERNAME>\AppData\Local\Programs\Cisco Spark\dependencies Else if webex was deployed by SCCM (or installed from Software Center), then path is  с:\ProgramFiles\Cisco Spark\dependencies