badcat1215
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee
    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Versions and GitHub Sync Note Insights Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee
  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       owned this note    owned this note      
    Published Linked with GitHub
    Subscribed
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    Subscribe
    psexec.exe (windows提權) === ###### tags: `OSCP` ## 教學與PoC 工具直接去微軟官網下載就好 https://docs.microsoft.com/en-us/sysinternals/downloads/psexec 把下載好的PSTools.zip解壓縮到一個資料夾下 以系統管理員身分執行CMD(命令提示字元) ![](https://i.imgur.com/eaxw3b3.png) 然後切換目錄到剛剛解壓縮的該目錄下 譬如 ```bash= cd C:\Users\XXXX\Downloads\PSTools\ ``` ![](https://i.imgur.com/7fyoJxA.png) 執行指令 ```bash= psexec.exe -s -i cmd.exe ``` 應該就會彈出另一個視窗 成功拿到 systemroot 的cmd.exe 可以下指令whoami確認,身分會是nt authority\system 你就成功取得了傳說中的最高system權限 超越administrator的權限 ![](https://i.imgur.com/1CpBOBl.png) 如果上面指令失敗了 顯示存取被拒 有個可能是你的CMD執行的權限不夠 必須要用上面的方法來以系統管理員身分執行CMD才行 一般在視窗路徑輸入CMD的方法,權限很可能不夠高 ![](https://i.imgur.com/9psCBrW.png) ![](https://i.imgur.com/m8UqELS.png) ## 其他 PsExec 指令 來源: https://blog.yowko.com/psexec/ ### 用法 ```bash= psexec [\\ computer [,computer2 [,...] | @file]] [ - u user [-p psswd] [ - ns] [ - r servicename] [ - h] [ - l] [ - s | -e] c [-f | -v]] [ - w directory] ​​[ - d] [ - <priority>] [ - an,n,...] ``` ### 參數 參數| 說明 -|- -a| 指定特定處理器執行應用程式 (For example, 指定 cpu 2 及 cpu 4 來執行程式 : “-a 2,|4”) -c| 將指定執行的程式複製至目標電腦上執行;如果未使用這個參數,需確保程式存在目標電腦上的環境變數|的 system path 中 -d| 不等執行程序終止 (非互動性). -e| 不載入特定帳戶的個人資料. -f| 目標電腦上已存在要執行的檔案,仍然複製 -i| 在目標電腦上建立專屬的 session 來執行程式.未指定會在 console session 下執行 -h| 如果目標系統是 Vista 之後,在允許的情況下會提高帳戶安全性層級來執行程式 -l| 以受限使用者來執行(取消管理者群組權限,只允許指定使用者群組的權限)。 Vista 會使用低完整|性來執行 -n| 指定連線至目標電腦連線逾期的時間(單位:秒) -p| 指定帳號的密碼.如果未使用這個參數提供,會跳出視窗要求密碼 -r| 指定目標電腦上的 service –> 這我測不出用途 -s| 在目標電腦的系統帳戶下執行程式 -u| 指定登入目標電腦的使用者帳號 -v| 需執行的檔案比目標電腦新才複製檔案 -w| 設定執行的工作目錄 (對於目標電腦而言). –> 這我測不出用途 -x| Display the UI on the Winlogon secure desktop (local system only). -priority| 指定不同的優先程式來執行程式: -low, -belownormal, -abovenormal, -high or -realtime. Vista 可以使用 -background 來降低 memory 跟 I/O . computer| 指定 PsExec 執行指令的目標電腦.如果未指定電腦名稱就會直接在本機執行; 如果使用 (\*) 來指定執行目標,發動電腦及目標電腦需在同一個網域中 @file| 執行指令的目標對象清單檔案 cmd| 想要執行的應用程式名稱 arguments| 執行應用程式的參數(檔案路徑需是目標電腦上的絕對路行). -accepteula| 隱藏授權視窗 ## 其他工具列表 工具| 描述 -|- PsExec| 可讓您在任何使用者內容中執行處理序。 PsFile| 顯示系統上以遠端方式開啟的檔案。 PsGetSid| 顯示電腦或使用者的 Windows 安全性識別碼 (SID)。 PsInfo| 列出有關 Windows 系統的資訊。 PsKill| 根據名稱或處理序識別碼刪除處理序。 PsList| 列出有關執行中處理序的詳細資訊。 PsLoggedOn| 顯示所有本機登入使用者,以及遠端資源共用使用者。 PsLogList| 傾印 Windows 事件記錄檔記錄。 PsPasswd| 變更使用者帳戶密碼。 PsService| 檢視和控制 Windows 服務。 PsShutdown| 讓電腦關閉、重新啟動、休眠或暫止。 PsSuspend| 暫止執行中的處理序。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully