Dùng PowerRunAsAttached để leo thang đặc quyền trên Window

TricksMMO

Administrator
Staff member
, powerrunasattached, windows ** powerrunasattached - một kịch bản để giúp bạn thực hiện nó hoạt động **

Bạn có máy tính chạy hệ điều hành Windows và có nhiều người dùng không?Bạn có muốn truy cập CMD và PowerShell của những người dùng khác mà không cần phải đăng xuất khỏi người dùng hiện tại của bạn không?Không muốn đóng các ứng dụng của bạn nhưng cần truy cập người dùng khác để làm việc?Đừng lo lắng, hôm nay tôi sẽ chỉ cho bạn cách truy cập bảng điều khiển của người dùng khác bằng tập lệnh có tên PowerRunasattached.

## powerrunasattached - một kịch bản để giúp bạn thực hiện nó

Cá nhân, tôi có nhiều người dùng trên máy tính của mình để phục vụ các mục đích khác nhau.Ví dụ: tôi thường có 3 người dùng bao gồm: 1 người chơi trò chơi, 1 người dùng cho mã hóa và 1 người dùng để người khác sử dụng.Tất cả đều phục vụ các mục đích khác nhau để giúp tôi tập trung nhiều hơn vào công việc của mình.Nhưng đôi khi tôi cũng có những thứ mà tôi cần sử dụng người dùng còn lại nhưng tôi không muốn đăng xuất khỏi người dùng hiện tại của mình.

May mắn thay, tôi đã tìm thấy một kịch bản trong cộng đồng GitHub.Kịch bản powerrunasattached của một người bạn với tên người dùng DarkCodersc được sinh ra để gọi console (CMD hoặc PowerShell) của người dùng khác.

Hãy bắt đầu với thiết lập để bạn có thể truy cập vào bảng điều khiển của người dùng khác thông qua PowerRunasattached!

## Hướng dẫn sử dụng powerrunasattached để leo thang đặc quyền trên Windows

### Phần 1: Thiết lập tập lệnh

Để thực hiện phần này, thiết bị của bạn yêu cầu:

* Giấy phép Windows hoạt động
* Cập nhật đầy đủ
* Ít nhất 2 người dùng trở lên

Sau khi bạn đáp ứng các yêu cầu trên, hãy để tôi đi vào cách thiết lập tập lệnh này!

** Bước 1: ** Bạn tải xuống tập lệnh từ GitHub [tại đây] (https://github.com/darkcodersc/powerrunasattached).Sau đó tiến hành trích xuất tập tin.

** Bước 2: ** Trong thư mục PowerRunasattached-Main, sẽ có một tệp gọi là PowerRunasattached.Hãy nhớ đường dẫn đến tệp đó.

** Bước 3: ** Bắt đầu PowerShell làm quản trị viên.

** Bước 4: ** Trong PowerShell, bạn viết các lệnh sau:

`` `
# Mẫu tham chiếu
$ P = [Môi trường] :: GetEnvironmentVarable ("PSModulePath")
$ P += "; [Đường dẫn đến tệp powerrunasattached trong bước 2]"
.

# Ví dụ
$ P = [Môi trường] :: GetEnvironmentVarable ("PSModulePath")
$ P += ";
.
`` `

** Bước 5: ** Bạn thêm câu lệnh sau để nhập tập lệnh dưới dạng mô -đun:

`` `
Nhập khẩu mô-đun powerrunasattached
`` `

** Lưu ý: ** Nếu bạn nhận được thông báo lỗi như được hiển thị bên dưới, hãy chạy câu lệnh sau:

`` `
Set -ExecutionPolicy -ExecutSpolicy không giới hạn
`` `

Đó là nó, bạn đã hoàn thành thiết lập.Bây giờ tôi sẽ hướng dẫn bạn cách sử dụng tập lệnh!

### Phần 2: Sử dụng tập lệnh

Tất cả những gì bạn cần làm là nhập câu lệnh sau trên PowerShell của bạn:

`` `
Gọi Runasattached -username "[Tên người dùng]" -Password "[Mật khẩu của người dùng đó (để trống nếu không)]"
`` `

Ví dụ:

`` `
Invoke -Runasattached -username "wdchocopie" -password "anonyviet123@"
`` `

Bạn có thể sử dụng câu lệnh `whoami` để kiểm tra bạn đang ở người dùng nào!

**Chúc may mắn!**

** Thẻ: ** Bảng điều khiển, GitHub, Hướng dẫn, PowerRunasattached, Windows
=======================================
, powerrunasattached, windows **PowerRunasattached - A script to help you do IT work**

Do you have a computer running Windows operating system and have multiple users? Do you want to access the CMD and PowerShell of other users without having to log out of your current user? Don't want to close your applications but need to access another user to work? Don't worry, today I will show you how to access the console of other users using a script called PowerRunasattached.

## PowerRunasattached - A script to help you do IT work

Personally, I have multiple users on my computer to serve different purposes. For example, I usually have 3 users including: 1 game player, 1 user for coding, and 1 user for others to use. They all serve different purposes to help me focus more on my work. But sometimes I also have things that I need to use the remaining users but I don't want to log out of my current user.

Luckily, I found a script in the GitHub community. The script Powerrunasattached of a friend with the username Darkcodersc was born to call the Console (CMD or PowerShell) of other users.

Let's get started with the setup so that you can access the console of other users through PowerRunasattached!

## Instructions for using PowerRunasattached to escalate privileges on Windows

### Part 1: Setting up the script

To do this part, your device requires:

* Active Windows license
* Fully updated
* At least 2 users or more

After you have met the above requirements, let me go into how to set up this script!

**Step 1:** You download the script from GitHub [here](https://github.com/Darkcodersc/PowerRunasattached). Then proceed to extract the file.

**Step 2:** In the PowerRunasattached-Main folder, there will be a file called PowerRunasattached. Remember the path to that file.

**Step 3:** Start PowerShell as Administrator.

**Step 4:** In PowerShell, you write the following commands:

```
# reference form
$P = [Environment]::GetEnvironmentVariable("PSModulePath")
$P += "; [The path to the PowerRunasattached file in step 2]"
[Environment]::SetEnvironmentVariable("psmodulepath", $p)

# For example
$P = [Environment]::GetEnvironmentVariable("PSModulePath")
$P += "; C:\\Users\\Hoang\\Desktop\\PowerRunasatted-Main\\Powerrunasattached-Main"
[Environment]::SetEnvironmentVariable("psmodulepath", $p)
```

**Step 5:** You add the following statement to import the script as a module:

```
Import-Module PowerRunasattached
```

**Note:** If you get the error message as shown below, run the following statement:

```
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
```

That's it, you have completed the setup. Now I will guide you on how to use the script!

### Part 2: Using the script

All you need to do is enter the following statement on your PowerShell:

```
Invoke-Runasattached -username "[User's name]" -Password "[Password of that user (leave blank if not)]"
```

For example:

```
Invoke-Runasattached -username "wdchocopie" -password "anonyviet123@"
```

You can use the `WHOAMI` statement to check which user you are in!

**Good luck!**

**Tags:** console, github, instructions, powerrunasattached, windows
 
Join Telegram ToolsKiemTrieuDoGroup
Back
Top