{"id":30847590,"url":"https://github.com/ktauchathuranga/privilegeos","last_synced_at":"2025-09-07T02:45:26.084Z","repository":{"id":304001607,"uuid":"1006517915","full_name":"ktauchathuranga/privilegeos","owner":"ktauchathuranga","description":"A specialized Linux distribution designed for Windows admin access bypass","archived":false,"fork":false,"pushed_at":"2025-08-11T11:09:42.000Z","size":4011,"stargazers_count":1,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T04:50:23.488Z","etag":null,"topics":["fortheloveofcode","linux-custom-image","privilegeos","windows-admin-access"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ktauchathuranga.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"ktauchathuranga"}},"created_at":"2025-06-22T13:00:34.000Z","updated_at":"2025-08-22T15:14:16.000Z","dependencies_parsed_at":"2025-07-10T21:50:16.626Z","dependency_job_id":"01291883-6bc8-45de-ab88-0001f02a0e8b","html_url":"https://github.com/ktauchathuranga/privilegeos","commit_stats":null,"previous_names":["ktauchathuranga/privilegeos"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ktauchathuranga/privilegeos","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktauchathuranga%2Fprivilegeos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktauchathuranga%2Fprivilegeos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktauchathuranga%2Fprivilegeos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktauchathuranga%2Fprivilegeos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ktauchathuranga","download_url":"https://codeload.github.com/ktauchathuranga/privilegeos/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ktauchathuranga%2Fprivilegeos/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273989788,"owners_count":25203261,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-07T02:00:09.463Z","response_time":67,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fortheloveofcode","linux-custom-image","privilegeos","windows-admin-access"],"created_at":"2025-09-07T02:45:21.685Z","updated_at":"2025-09-07T02:45:26.073Z","avatar_url":"https://github.com/ktauchathuranga.png","language":"Shell","funding_links":["https://github.com/sponsors/ktauchathuranga"],"categories":[],"sub_categories":[],"readme":"### PrivilegeOS\n\n**A specialized Linux distribution designed for penetration testing and Windows admin access bypass**\n\n![PrivilegeOS Banner](docs/banner.webp)\n*(yes, a real embroidery art done by meh... mmh peak artistry right there 🙂‍↕️)*\n\n\n## 📋 Table of Contents\n\n* [Overview](#-overview)\n* [Features](#-features)\n* [System Requirements](#-system-requirements)\n* [Installation](#-installation)\n* [Usage](#-usage)\n* [Built-in Tools](#️-built-in-tools)\n* [Windows Admin Bypass](#-windows-admin-bypass)\n* [Building from Source](#-building-from-source)\n* [Configuration](#️-configuration)\n* [Troubleshooting](#-troubleshooting)\n* [Security Notice](#-security-notice)\n* [Contributing](#-contributing)\n* [License](#-license)\n* [Screenshots](#-screenshots)\n\n## IMPORTANT LEGAL NOTICE\n\n**PrivilegeOS is intended for AUTHORIZED SECURITY TESTING ONLY**\n\n### Permitted Use\n- ✅ Systems you own\n- ✅ Authorized penetration testing with written consent\n- ✅ Educational environments and labs\n- ✅ Security research with proper permissions\n\n### Prohibited Use\n- ❌ Unauthorized access to any system\n- ❌ Any illegal or malicious activities\n- ❌ Use without explicit written permission\n- ❌ Violating any local, state, or federal laws\n\n### User Responsibility\nBy downloading, using, or distributing this software, you acknowledge:\n1. You will only use this tool on systems you own or have explicit authorization to test\n2. You are responsible for complying with all applicable laws\n3. You will not use this tool for unauthorized access or malicious purposes\n4. You understand the legal implications of using penetration testing tools\n\n### No Warranty\nThis software is provided \"AS IS\" without warranty of any kind.\nThe authors are not liable for any damages or legal consequences.\n\n## Educational Purpose Statement\n\nPrivilegeOS is developed for:\n- **Cybersecurity education** and training\n- **Defensive security** understanding\n- **Authorized vulnerability assessment**\n- **Security research** and improvement\n\nThis tool helps security professionals and students understand:\n- How these attacks work\n- How to detect such attacks\n- How to defend against these techniques\n- Proper security testing methodologies\n\n## 🔍 Overview\n\nPrivilegeOS is a minimal, bootable Linux distribution built specifically for penetration testing scenarios involving Windows systems. It features native NTFS3 kernel support, custom penetration testing tools, and specialized utilities for Windows admin access bypass techniques.\n\n**Key Characteristics:**\n- **Lightweight**: ~50MB bootable image\n- **Fast Boot**: Boots in under 30 seconds\n- **No Installation Required**: Runs entirely from USB/CD\n- **Root Access**: Automatic root login\n- **NTFS3 Support**: Native kernel NTFS driver for reliable Windows filesystem access\n- **UEFI \u0026 Legacy BIOS Compatible**: Supports both modern and older firmware.\n\n## ✨ Features\n\n### Core System\n- **Linux Kernel**: 6.15.3 with custom configuration\n- **Init System**: BusyBox with custom scripts\n- **Filesystem Support**: NTFS3 (native), FAT32, EXT4, XFS, BTRFS\n- **Network Support**: Ethernet and Wi-Fi drivers\n- **Storage Support**: SATA, NVMe, USB storage devices\n- **Graphics Support**: Intel, AMD, NVIDIA drivers\n- **Boot Support**: UEFI and Legacy BIOS modes.\n\n### Security Tools\n- **Windows Admin Bypass**: Sticky keys replacement technique\n- **NTFS Mount Tools**: Advanced NTFS mounting with various options\n- **Drive Analysis**: Comprehensive partition and filesystem detection\n- **Network Tools**: Basic network diagnostics and configuration\n- **Hibernation Handling**: Automatic hibernation file detection and removal\n\n### User Experience\n- **Automatic Boot**: No user interaction required\n- **Color-coded Interface**: Easy-to-read terminal output\n- **Command Aliases**: Simplified commands for common operations\n- **Help System**: Built-in documentation and examples\n\n## 💻 System Requirements\n\n### Minimum Requirements\n- **CPU**: x86-64 compatible processor\n- **RAM**: 1GB (2GB recommended)\n- **Storage**: 1GB available space for USB creation\n- **Firmware**: UEFI or Legacy BIOS support.\n\n### Supported Hardware\n- **Storage Controllers**: AHCI, NVMe, USB\n- **Network Adapters**: Intel, Realtek, Atheros, Broadcom\n- **Graphics Cards**: Intel integrated, AMD, NVIDIA\n- **Input Devices**: USB keyboards, mice, touchpads\n\n## 🚀 Installation\n\n### Quick Start: Method 1 (Image Burning)\n\n1. **Download** the latest PrivilegeOS image:\n   ```bash\n   wget https://github.com/ktauchathuranga/privilegeos/releases/latest/PrivilegeOS.img\n   ```\n\n2. **Write to USB** drive (replace `/dev/sdX` with your USB device):\n   ```bash\n   sudo dd if=PrivilegeOS.img of=/dev/sdX bs=8M status=progress conv=fsync\n   ```\n\n3. **Boot** from USB drive:\n   - Enable UEFI or Legacy BIOS boot in your firmware settings.\n   - Select USB drive as boot device.\n   - PrivilegeOS will boot automatically.\n\n### Alternative GUI Tools for Image Burning\n\n#### Using Balena Etcher\n1. Download [Balena Etcher](https://www.balena.io/etcher/)\n2. Select the `PrivilegeOS.img` file.\n3. Select your USB drive.\n4. Click \"Flash\".\n\n#### Using Rufus (Windows)\n1. Download [Rufus](https://rufus.ie/)\n2. Select your USB drive.\n3. Select `PrivilegeOS.img` as the boot selection.\n4. Set the partition scheme to GPT for UEFI or MBR for Legacy BIOS.\n5. Click \"START\".\n\n## 💾 USB Writing Tool\n\nPrivilegeOS includes a dedicated USB writing tool (`boot.sh`) for easy image deployment to USB drives.\n\n### Using boot.sh\n\nThe `boot.sh` script provides a safe and convenient way to write PrivilegeOS images to USB drives with built-in safety checks and verification.\n\n#### Basic Usage\n\n```bash\n# Interactive mode (will prompt for device selection)\n./boot.sh\n\n# List available block devices\n./boot.sh --list\n\n# Write to a specific device\n./boot.sh --device sdb\n\n# Automated mode (skip confirmations)\n./boot.sh --device sdb --yes\n\n# Use custom image file\n./boot.sh --image /path/to/custom.img --device sdb\n\n# Use custom OS name for display\n./boot.sh --name MyCustomOS --device sdc\n```\n\n#### Command Line Options\n\n| Option | Description | Example |\n|--------|-------------|---------|\n| `-h, --help` | Show help message and exit | `--help` |\n| `-i, --image FILE` | Specify disk image file | `--image custom.img` |\n| `-n, --name NAME` | Set OS name for display | `--name \"Custom PrivilegeOS\"` |\n| `-y, --yes` | Skip confirmation prompts | `--yes` |\n| `-d, --device DEVICE` | Specify target device | `--device sdb` |\n| `-l, --list` | List available block devices | `--list` |\n\n#### Safety Features\n\nThe `boot.sh` script includes comprehensive safety measures:\n\n- **System Drive Protection**: Automatically detects and prevents writing to system drives.\n- **Device Validation**: Verifies device existence and type before writing.\n- **Mount Check**: Automatically unmounts any mounted partitions on the target device.\n- **Size Verification**: Ensures the USB drive is large enough for the image.\n- **Confirmation Prompts**: Requires explicit confirmation before destructive operations.\n- **Write Verification**: Performs basic verification after writing.\n\n#### Example Usage Sessions\n\n**Interactive Mode:**\n```bash\n$ ./boot.sh\n\nPrivilegeOS USB Writer\nImage: build/PrivilegeOS.img\n\nAvailable drives:\nNAME    SIZE MODEL             VENDOR   TYPE\nsdb     32G  Extreme           SanDisk  disk\nsdc     64G  DataTraveler_3.0  Kingston disk\n\nEnter the device name to write to (e.g., sdb, NOT sdb1): sdb\n\nWARNING: YOU ARE ABOUT TO OVERWRITE /dev/sdb\nALL DATA ON THIS DEVICE (32G) WILL BE LOST!\nDevice: /dev/sdb\nImage file: build/PrivilegeOS.img (35M)\nOS: PrivilegeOS\n\nType 'YES' to continue: YES\n\nWriting image to /dev/sdb...\n35+0 records in\n35+0 records out\n536870912 bytes (36 MB, 35 MiB) copied, 45.2s, 11.9 MB/s\n\nSUCCESS: PrivilegeOS has been written to /dev/sdb\nYou can now boot your computer from this USB drive.\n```\n\n**Automated Mode:**\n```bash\n# Write to sdb without prompts\n./boot.sh --device sdb --yes\n\n# Use custom image and skip prompts\n./boot.sh --image /path/to/my-privilegeos.img --device sdc --yes\n```\n\n#### Error Handling\n\nThe script provides clear error messages for common issues:\n\n```bash\n# Device doesn't exist\nERROR: Device /dev/sdz does not exist or is not a block device.\n\n# USB drive too small\nERROR: USB drive is too small (16G) for the image (32G).\n\n# Trying to write to system drive\nERROR: You're trying to write to the system's boot disk! Operation aborted.\n\n# Image file not found\nERROR: Disk image not found: missing.img\n```\n\n#### Log Files\n\nAll operations are logged to `build/logs/boot.log` for troubleshooting and audit purposes.\n\n## 📖 Usage\n\n### First Boot\n\nWhen PrivilegeOS boots, you'll see:\n\n```\n  ____       _       _ _                  ___  ____\n |  _ \\ _ __(_)_   _(_) | ___  __ _  ___ / _ \\/ ___|\n | |_) | '__| \\ \\ / / | |/ _ \\/ _` |/ _ \\ | | \\___ \\\n |  __/| |  | |\\ V /| | |  __/ (_| |  __/ |_| |___) |\n |_|   |_|  |_| \\_/ |_|_|\\___|\\__, |\\___|\\___/|____/\n                              |___/\n\nWelcome to PrivilegeOS!\nBuild date: 2025-07-06 11:51:07\nYou are running as: ROOT\n\nHardware Information:\n====================\nIntel(R) Core(TM) i7-8750H CPU @ 2.20GHz\nMemory: 1024/8192 MB\nNTFS3 support: AVAILABLE (native kernel driver)\n\nCustom commands available:\n  - getadmin\n  - putadmin\n  - getdrives\n\nType 'poweroff' or 'reboot' to exit.\nTo mount NTFS drives: mount -t ntfs3 /dev/sdXN /mnt\n\n/ #\n```\n\n### Basic Commands\n\n```bash\n# List all storage devices\ngetdrives\n\n# Mount NTFS partition\nmount -t ntfs3 /dev/sda2 /mnt\n\n# Navigate mounted drive\ncd /mnt\nls -la\n\n# Windows admin bypass\ngetadmin --help\ngetadmin -f -d\n\n# Restore Windows to normal\nputadmin --help\nputadmin -f -d\n\n# Network configuration\nip addr show\nip link set eth0 up\n```\n\n### Command Reference\n\n| Command | Description | Example |\n|---------|-------------|---------|\n| `getdrives` | List all drives and partitions | `getdrives` |\n| `getadmin` | Windows admin bypass tool | `getadmin -f -d` |\n| `putadmin` | Restore Windows to normal | `putadmin -f -d` |\n| `mount-ntfs` | Mount NTFS partition (alias) | `mount-ntfs /dev/sda2 /mnt` |\n| `poweroff` | Shutdown system | `poweroff` |\n| `reboot` | Restart system | `reboot` |\n\n## 🛠️ Built-in Tools\n\n### Drive Management Tools\n\n#### `getdrives`\nComprehensive drive and partition analysis tool.\n\n**Features:**\n- Partition table display\n- Filesystem detection\n- Mount status\n- Disk usage information\n- NTFS3 compatibility check\n\n**Usage:**\n```bash\ngetdrives\n```\n\n**Output Example:**\n```\n===============================================\n            STORAGE DEVICES LIST\n===============================================\n\nPartition Table:\nMAJOR MINOR  #BLOCKS  NAME\n8        0  488386584 sda\n8        1     204800 sda1\n8        2  488179712 sda2\n\nFilesystem Detection:\n/dev/sda1: vfat\n/dev/sda2: ntfs\n\nNTFS3 Commands (Native Kernel Driver):\nMount NTFS partition: mount -t ntfs3 /dev/sdXN /mnt\nMount NTFS read-only: mount -t ntfs3 -o ro /dev/sdXN /mnt\n```\n\n### Windows Admin Bypass Tools\n\n#### `getadmin`\nAdvanced Windows admin access bypass tool using sticky keys replacement.\n\n**Features:**\n- Automatic Windows partition detection\n- Hibernation file handling and optional deletion\n- File integrity verification\n- Multiple mount options\n- Comprehensive logging\n- Legal authorization confirmation\n\n**Usage:**\n```bash\n# Basic usage\ngetadmin\n\n# Force mount with hibernation file deletion\ngetadmin --force --delete-hiberfil\n\n# Show help\ngetadmin --help\n```\n\n**Options:**\n- `-f, --force`: Use force option when mounting NTFS partitions\n- `-d, --delete-hiberfil`: Delete hiberfil.sys if found (helps with hibernated Windows)\n- `-h, --help`: Show help message\n\n**Note on hibernation file deletion:**\n- Allows proper NTFS mounting of hibernated Windows systems\n- Prevents Windows from resuming from hibernation (cold boot instead)\n- Frees up disk space (hiberfil.sys can be several GB)\n\n#### `putadmin`\nWindows system restoration tool to reverse getadmin modifications.\n\n**Features:**\n- Automatic backup detection\n- File restoration verification\n- Cleanup of temporary files\n- Safety checks and confirmations\n- Hibernation file handling and optional deletion\n- Complete system restoration\n\n**Usage:**\n```bash\n# Basic restoration\nputadmin\n\n# Force restoration with hibernation file deletion\nputadmin --force --delete-hiberfil\n\n# Show help\nputadmin --help\n```\n\n**Options:**\n- `-f, --force`: Use force option when mounting NTFS partitions\n- `-d, --delete-hiberfil`: Delete hiberfil.sys if found (helps with hibernated Windows)\n- `-h, --help`: Show help message\n\n**Note:** `putadmin` now includes the same hibernation file handling capabilities as `getadmin`, making it consistent and able to handle hibernated Windows systems during restoration.\n\n## 🔧 Windows Admin Bypass\n\n### Overview\n\nPrivilegeOS includes a sophisticated Windows admin bypass system that uses the \"sticky keys\" replacement technique. This method is commonly used in penetration testing to gain administrative access to Windows systems.\n\n### How It Works\n\n1. **Detection**: Script scans for Windows NTFS partitions\n2. **Hibernation Check**: Detects and optionally removes hibernation files\n3. **Mounting**: Mounts the Windows filesystem with write access\n4. **Backup**: Creates a backup of original system files\n5. **Replacement**: Replaces `sethc.exe` with `cmd.exe`\n6. **Verification**: Confirms operation success\n\n### Usage Process\n\n#### Step 1: Boot PrivilegeOS\nBoot from your USB and wait for the command prompt.\n\n#### Step 2: Run getadmin\n```bash\n/ # getadmin --force --delete-hiberfil\n```\n\n**Note:** The tool will prompt for legal authorization confirmation before proceeding.\n\n#### Step 3: Boot Windows\nRestart and boot into Windows normally.\n\n#### Step 4: Access Admin Shell\nAt the Windows login screen, press `Shift` five times. Instead of sticky keys, a command prompt with SYSTEM privileges will open.\n\n#### Step 5: Create Admin User\n```cmd\nnet user administrator /active:yes\nnet user newadmin password123 /add\nnet localgroup administrators newadmin /add\n```\n\n#### Step 6: Restore System (Optional)\nBoot back into PrivilegeOS and run:\n```bash\n/ # putadmin --force --delete-hiberfil\n```\n\n### Hibernation File Handling\n\nBoth `getadmin` and `putadmin` can handle Windows hibernation files:\n\n#### Automatic Detection\n- Detects `hiberfil.sys` presence automatically\n- Shows file size and hibernation status\n- Warns about hibernation implications\n\n#### Optional Deletion\n- Use the `--delete-hiberfil` flag to automatically delete the hibernation file\n- Prompts for confirmation before deletion\n- Verifies successful deletion\n- Frees up disk space (often several GB)\n\n#### Benefits of Deletion\n- Allows proper NTFS mounting of hibernated systems\n- Prevents Windows hibernation resume issues\n- Provides a cleaner system state for modifications\n\n### Security Considerations\n\n⚠️ **WARNING**: This technique should only be used on systems you own or have explicit permission to test.\n\n- **Legal**: Ensure you have proper authorization.\n- **Detection**: May be detected by security software.\n- **Forensics**: Leaves traces in system logs.\n- **Backup**: Always create backups before modification.\n- **Hibernation**: Deletion prevents hibernation resume (unsaved work will be lost).\n\n## 🔨 Building from Source\n\n### Prerequisites\n\n#### Required Packages (Ubuntu/Debian)\n```bash\nsudo apt-get update\nsudo apt-get install -y \\\n    build-essential \\\n    gcc \\\n    make \\\n    bc \\\n    libncurses-dev \\\n    flex \\\n    bison \\\n    libelf-dev \\\n    libssl-dev \\\n    qemu-system-x86_64 \\\n    ovmf \\\n    parted \\\n    dosfstools \\\n    wget \\\n    xz-utils\n```\n\n#### Required Packages (Fedora/CentOS)\n```bash\nsudo dnf install -y \\\n    gcc \\\n    make \\\n    bc \\\n    ncurses-devel \\\n    flex \\\n    bison \\\n    elfutils-libelf-devel \\\n    openssl-devel \\\n    qemu-system-x86 \\\n    edk2-ovmf \\\n    parted \\\n    dosfstools \\\n    wget \\\n    xz\n```\n\n### Build Process\n\n#### 1. Clone Repository\n```bash\ngit clone https://github.com/ktauchathuranga/privilegeos.git\ncd privilegeos\n```\n\n#### 2. Basic Build\n```bash\n./build.sh\n```\nThis will create the `PrivilegeOS.img` file and a `PrivilegeOS_contents.zip` file in the `build/` directory.\n\n#### 3. Custom Build Options\n```bash\n# Clean build with custom size\n./build.sh --clean --size 1024 --threads 8\n\n# QEMU-only testing\n./build.sh --qemu-only\n\n# Custom kernel and BusyBox versions\n./build.sh --kernel 6.15.3 --busybox 1.36.1\n\n# Use custom configurations\n./build.sh --kernel-config my_kernel.config --busybox-config my_busybox.config\n```\n\n#### 4. Build Options Reference\n\n| Option | Description | Example |\n|--------|-------------|---------|\n| `--clean` | Clean the build directory | `--clean` |\n| `--size SIZE` | Disk image size in MB | `--size 1024` |\n| `--threads N` | Compilation threads | `--threads 8` |\n| `--memory SIZE` | QEMU memory size | `--memory 4G` |\n| `--qemu-only` | Test in QEMU only | `--qemu-only` |\n| `--skip-qemu` | Skip QEMU testing | `--skip-qemu` |\n| `--kernel-config FILE` | Custom kernel config | `--kernel-config my.config` |\n| `--busybox-config FILE` | Custom BusyBox config | `--busybox-config my.config` |\n\n### Adding Custom Scripts\n\n#### 1. Create Script Directory\n```bash\nmkdir -p scripts\n```\n\n#### 2. Add Your Scripts\n```bash\n# Example custom script\ncat \u003e scripts/myscript.sh \u003c\u003c 'EOF'\n#!/bin/sh\necho \"Hello from custom script!\"\nEOF\nchmod +x scripts/myscript.sh\n```\n\n#### 3. Rebuild\n```bash\n./build.sh\n```\n\n#### 4. Use in PrivilegeOS\nAfter rebuilding, your script will be available as:\n```bash\n/ # myscript\nHello from custom script!\n```\n\n### Build Directory Structure\n\n```\nprivilegeos/\n├── build.sh                  # Main build script\n├── scripts/                  # Custom scripts directory\n│   ├── getadmin.sh          # Windows admin bypass tool\n│   ├── putadmin.sh          # Windows restoration tool\n│   └── getdrives.sh         # Drive analysis tool\n├── configs/                 # Configuration files\n│   ├── kernel.config        # Kernel configuration\n│   └── busybox.config       # BusyBox configuration\n├── build/                   # Build output directory\n│   ├── PrivilegeOS.img      # Final disk image\n│   ├── PrivilegeOS_contents.zip # Zip file of bootable contents\n│   ├── initramfs/           # Root filesystem\n│   └── logs/                # Build logs\n├── linux-6.15.3/           # Kernel source (downloaded)\n├── busybox-1.36.1/          # BusyBox source (downloaded)\n└── README.md                # This file\n```\n\n## ⚙️ Configuration\n\n### Kernel Configuration\n\nThe kernel is configured with these key features:\n\n#### Filesystem Support\n- **NTFS3**: Native kernel NTFS driver\n- **FAT32/VFAT**: Windows filesystem support\n- **EXT4**: Linux filesystem support\n- **XFS/BTRFS**: Advanced filesystems\n\n#### Hardware Support\n- **Storage**: AHCI, NVMe, USB storage\n- **Network**: Ethernet and Wi-Fi drivers\n- **Graphics**: Intel, AMD, NVIDIA drivers\n- **Input**: USB keyboards and mice\n\n#### Security Features\n- **EFI**: UEFI boot support\n- **Framebuffer**: Console graphics support\n- **Serial**: Debug console support\n\n### BusyBox Configuration\n\nBusyBox is configured with these utilities:\n\n#### Core Utilities\n- `ls`, `cp`, `mv`, `rm`, `mkdir`, `rmdir`\n- `cat`, `more`, `less`, `grep`, `sed`, `awk`\n- `tar`, `gzip`, `gunzip`, `find`, `which`\n\n#### System Utilities\n- `mount`, `umount`, `df`, `du`, `free`\n- `ps`, `top`, `kill`, `killall`\n- `chmod`, `chown`, `chgrp`\n\n#### File Utilities\n- `blkid`, `fdisk`, `lsblk`\n- `mkfs.vfat`, `fsck`\n\n### Custom Configurations\n\n#### Mount Options\n```bash\n# NTFS read-write with full permissions\nmount -t ntfs3 -o rw,uid=0,gid=0,fmask=133,dmask=022 /dev/sda2 /mnt\n\n# NTFS read-only\nmount -t ntfs3 -o ro /dev/sda2 /mnt\n\n# NTFS with force (hibernated systems)\nmount -t ntfs3 -o rw,force /dev/sda2 /mnt\n```\n\n## 🔧 Troubleshooting\n\n### Common Issues\n\n#### Boot Issues\n\n**Problem**: System doesn't boot from USB\n**Solutions:**\n1. Verify that UEFI or Legacy BIOS boot is enabled in your firmware settings.\n2. Disable Secure Boot if it is enabled.\n3. Try different USB ports (USB 2.0 vs 3.0).\n4. Re-write the image to the USB with a different tool.\n\n**Problem**: Kernel panic on boot\n**Solutions:**\n1. Check hardware compatibility.\n2. Try booting with the `acpi=off` parameter.\n3. Verify the image integrity with a checksum.\n\n#### NTFS Mounting Issues\n\n**Problem**: Cannot mount NTFS partition\n**Solutions:**\n1. Check if NTFS3 is available: `grep ntfs3 /proc/filesystems`\n2. Try force mounting: `mount -t ntfs3 -o rw,force /dev/sdX /mnt`\n3. Check for hibernation: look for `hiberfil.sys`\n4. Use hibernation deletion: `getadmin --delete-hiberfil` or `putadmin --delete-hiberfil`\n5. Verify the partition exists: `fdisk -l`\n\n**Problem**: \"Read-only file system\" error\n**Solutions:**\n1. Remount with write permissions: `mount -o remount,rw /mnt`\n2. Check filesystem errors: `fsck.ntfs /dev/sdX`\n3. Remove the hibernation file: `rm /mnt/hiberfil.sys` or use `--delete-hiberfil`\n\n#### getadmin Issues\n\n**Problem**: No Windows partition found\n**Solutions:**\n1. Use the force option: `getadmin --force`\n2. Check partitions manually: `getdrives`\n3. Try different mount options.\n4. Use hibernation deletion: `getadmin --force --delete-hiberfil`\n5. Verify that Windows is not BitLocker encrypted.\n\n**Problem**: Permission denied errors\n**Solutions:**\n1. Check file permissions: `ls -la /mnt/Windows/System32/`\n2. Try changing permissions: `chmod 755 /mnt/Windows/System32/sethc.exe`\n3. Use the force mount option.\n4. Remove the hibernation file: `getadmin --delete-hiberfil`\n5. Check for file attributes: `lsattr /mnt/Windows/System32/sethc.exe`\n\n**Problem**: Hibernation file conflicts\n**Solutions:**\n1. Use hibernation deletion: `getadmin --delete-hiberfil`\n2. Manual deletion: `rm /mnt/hiberfil.sys`\n3. Boot Windows normally first, then shut down properly.\n4. Use force mount: `getadmin --force`\n\n#### putadmin Issues\n\n**Problem**: Cannot restore the system\n**Solutions:**\n1. Use the force option: `putadmin --force`\n2. Check for backup files: `ls -la /mnt/Windows/System32/sethc.exe.backup`\n3. Handle hibernation: `putadmin --force --delete-hiberfil`\n4. Verify the system was previously modified by getadmin.\n\n**Problem**: Bypass doesn't work in Windows\n**Solutions:**\n1. Verify that file sizes have changed: `ls -la /mnt/Windows/System32/sethc.exe`\n2. Check that a backup was created: `ls -la /mnt/Windows/System32/sethc.exe.backup`\n3. Try restoration and re-application: `putadmin` then `getadmin`\n4. Check Windows version compatibility.\n\n### Debug Information\n\n#### System Information\n```bash\n# Check kernel version and modules\nuname -a\nlsmod | grep ntfs\n\n# Check loaded filesystems\ncat /proc/filesystems\n\n# Check memory usage\nfree -m\n\n# Check storage devices\ncat /proc/partitions\n```\n\n#### Network Debugging\n\n```bash\n# Check network interfaces\nip addr show\n\n# Check network connectivity\nping 8.8.8.8\n\n# Check DNS resolution\nnslookup google.com\n```\n\n#### Storage Debugging\n```bash\n# Check block devices\nlsblk\n\n# Check filesystem types\nblkid\n\n# Check mount points\nmount | grep /dev/\n\n# Check disk usage\ndf -h\n\n# Check for hibernation files\nfind /mnt -name \"hiberfil.sys\" -ls 2\u003e/dev/null\n```\n\n### Log Files\n\n#### Build Logs\n- `build/logs/build.log` - Main build log\n- `build/logs/kernel_build.log` - Kernel compilation log\n- `build/logs/busybox_build.log` - BusyBox compilation log\n\n#### Runtime Logs\n- `/var/log/dmesg.log` - Kernel messages\n- `/tmp/rcS_started` - Init script status\n- `/tmp/rcS_completed` - Init completion status\n\n### Getting Help\n\n#### Community Support\n- **GitHub Issues**: [Report bugs and request features](https://github.com/ktauchathuranga/privilegeos/issues)\n- **Discussions**: [Ask questions and share tips](https://github.com/ktauchathuranga/privilegeos/discussions)\n\n## 🔒 Security Notice\n\n### Legal Disclaimer\n\n**PrivilegeOS is designed for educational and authorized penetration testing purposes only.**\n\nBy using this software, you acknowledge that:\n\n1. **Authorization Required**: You will only use this tool on systems you own or have explicit written permission to test.\n2. **Legal Compliance**: You will comply with all applicable local, state, and federal laws.\n3. **No Malicious Use**: You will not use this tool for unauthorized access, data theft, or malicious purposes.\n4. **Educational Purpose**: This tool is intended for learning about security vulnerabilities and defensive measures.\n\n### Technical Security\n\n#### Detection Avoidance\nThis tool may be detected by:\n- Antivirus software\n- Host-based intrusion detection systems\n- File integrity monitoring\n- Behavioral analysis tools\n\n#### Forensic Considerations\nThis tool may leave traces including:\n- Modified system files\n- Backup files in System32\n- Registry changes (if additional tools are used)\n- Event log entries\n- Deleted hibernation files\n\n## 🤝 Contributing\n\nWe welcome contributions from the security community!\n\n### Development Process\n\n#### 1. Fork the Repository\n```bash\ngit clone https://github.com/ktauchathuranga/privilegeos.git\ncd privilegeos\ngit checkout -b feature/my-new-feature\n```\n\n#### 2. Make Changes\n- Follow existing code style.\n- Add comprehensive comments.\n- Test thoroughly.\n- Update documentation.\n\n#### 3. Submit a Pull Request\n- Describe your changes clearly.\n- Include test results.\n- Reference any related issues.\n- Sign commits with a GPG key.\n\n### Contribution Guidelines\n\n#### Code Standards\n- **Shell Scripts**: Follow POSIX shell standards.\n- **Documentation**: Use clear, concise language.\n- **Comments**: Explain complex logic.\n- **Error Handling**: Include comprehensive error checking.\n\n#### Testing Requirements\n- Test on multiple hardware configurations.\n- Verify UEFI and Legacy BIOS compatibility.\n- Test with various Windows versions.\n- Test hibernation file handling.\n- Document any limitations or known issues.\n\n#### Documentation Updates\n- Update the README for new features.\n- Add help text for new commands.\n- Include usage examples.\n- Update the troubleshooting section.\n\n### Development Environment\n\n#### Setting Up the Development Environment\n```bash\n# Install development dependencies\nsudo apt-get install -y build-essential git\n\n# Clone the repository\ngit clone https://github.com/ktauchathuranga/privilegeos.git\ncd privilegeos\n\n# Create a development branch\ngit checkout -b develop\n```\n\n#### Testing Changes\n```bash\n# Test the build process\n./build.sh --qemu-only\n\n# Test specific components\n./build.sh --clean --skip-qemu\n\n# Test in a virtual machine\nqemu-system-x86_64 -bios /usr/share/ovmf/x64/OVMF.fd -drive file=build/PrivilegeOS.img,format=raw\n```\n\n## 📄 License\n\n### Third-Party Licenses\n\n#### Linux Kernel\nLicensed under the GNU General Public License v2.0\n- **Source**: https://kernel.org/\n- **License**: https://www.gnu.org/licenses/gpl-2.0.html\n\n#### BusyBox\nLicensed under the GNU General Public License v2.0\n- **Source**: https://busybox.net/\n- **License**: https://www.gnu.org/licenses/gpl-2.0.html\n\n#### Additional Components\nAll other components maintain their respective licenses. See individual source files for details.\n\n**Project Repository**: https://github.com/ktauchathuranga/privilegeos\n**Issue Tracker**: https://github.com/ktauchathuranga/privilegeos/issues\n\n---\n\n## 🫥 Screenshots\n\n![Screenshot](docs/ss1.png)\n![Screenshot](docs/ss2.png)\n\n**Built with ❤️ for the cybersecurity community**\n\n*\"Security through knowledge, not obscurity\"*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktauchathuranga%2Fprivilegeos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fktauchathuranga%2Fprivilegeos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fktauchathuranga%2Fprivilegeos/lists"}