How To Make A EICAR-Test-File In VB.NET

The EICAR Standard Anti-Virus Test File or EICAR test file is a computer file that was developed by the European Institute for Computer Antivirus Research (EICAR) and Computer Antivirus Research Organization (CARO), to test the response of computer antivirus (AV) programs. - Wikipedia
It's really easy to build a EICAR-Test-File in VB.NET because it has 68 ASCII characters which makes the file get detected as virus so what we are going to make is very simple, we are going to write those characters into a EXECUTABLE file.

The ASCII Characters X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

Just add a button to your form or write down on any events
'Don't forget to add Imports System.IO namespace
'By Mohamed Shimran
   Dim File As Integer
        Dim Text As String
        File = FreeFile()
        Text = "X5O!P" & Chr(37) & Chr(64) & "AP[4\PZX54(P^)7CC)7}" & Chr(36) & Chr(69) & Chr(73) & "CAR-STANDARD-ANTIVIRUS-TEST-FILE!" & Chr(36) & "H+H*"
        Dim save As New SaveFileDialog
        save.Filter = "Executable Files'(*.exe)|*.exe"
        save.ShowDialog()
            Dim strwrt As New StreamWriter(save.FileName)
            strwrt.Write(Text)
            strwrt.Close()
As you can see we have a string,integer & a savefiledialog declared so it writes the ASCII chracters to the exe file using stream write.

I have saved the exe file and here my avast pops up
EICAR
I hope you enjoyed this tutorial.

Post a Comment

Note: Only a member of this blog may post a comment.