{"id":13843994,"url":"https://github.com/ngalongc/AutoLocalPrivilegeEscalation","last_synced_at":"2025-07-11T21:32:25.789Z","repository":{"id":46930363,"uuid":"54310382","full_name":"ngalongc/AutoLocalPrivilegeEscalation","owner":"ngalongc","description":"An automated script that download potential exploit for linux kernel from exploitdb, and compile them automatically","archived":false,"fork":false,"pushed_at":"2021-09-21T08:26:28.000Z","size":9,"stargazers_count":486,"open_issues_count":3,"forks_count":194,"subscribers_count":28,"default_branch":"master","last_synced_at":"2024-11-21T16:39:21.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ngalongc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-20T09:46:26.000Z","updated_at":"2024-11-13T21:11:22.000Z","dependencies_parsed_at":"2022-09-03T04:42:28.189Z","dependency_job_id":null,"html_url":"https://github.com/ngalongc/AutoLocalPrivilegeEscalation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ngalongc/AutoLocalPrivilegeEscalation","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngalongc%2FAutoLocalPrivilegeEscalation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngalongc%2FAutoLocalPrivilegeEscalation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngalongc%2FAutoLocalPrivilegeEscalation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngalongc%2FAutoLocalPrivilegeEscalation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ngalongc","download_url":"https://codeload.github.com/ngalongc/AutoLocalPrivilegeEscalation/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ngalongc%2FAutoLocalPrivilegeEscalation/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264902742,"owners_count":23681119,"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","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":[],"created_at":"2024-08-04T17:02:32.263Z","updated_at":"2025-07-11T21:32:25.529Z","avatar_url":"https://github.com/ngalongc.png","language":"Python","funding_links":[],"categories":["Table of Contents","Python (1887)","Python","🚀 Elevating Privileges","Linux"],"sub_categories":["Privilege Escalation","Tools"],"readme":"# AutoLocalPrivilegeEscalation\nAn automated script that download potential exploit for linux kernel from exploitdb, and compile them automatically\n\nThis script is created due to Hackademics, there are so much possible exploit for that version of kernel, as a rookie OSCP student, I am not able to find out the correct exploit, also I am too lazy to test them one by one. So I hope this script can help me in the future.\n\nFirst, it search for linux pirvilege escalation from the exploitdb in local directory by searchsploit.\n\nPass in the kernel version as first parameter, it lists potential exploit, and ask if you want to copy them from the local directory.\n\nAfter that, it asks if you want to compile the downloaded C file.\n\nThen, it will ask if you want to make a tar ball of the directory.\n\nAnd it will show the summary of the downloaded files.\n\nScript Environment: Kali 3.18.0 kali2\n\nTest result in Kali 4.0 is negative for this script, need to redesign the architecture, maybe python is more suitable to do this automation, need to think again.\n\n16 Mar 25 Updated with Python version of this idea, more adaptable to different kali environment and more easy to change the code in this way.\n\n16 Apr 30 After almost finishes with all the boxes in OSCP, I have to admit I have not use this script at all during my lab times. There is one thing I learnt from the labs, do not run exploit blindly, as exploits might cause the system to crash, or leaves your footprint in a way you cannot imagine etc. Always enumerate more and gather all the information you have to escalate. DO NOT run the exploit blindly without knowing what the exploit does.\n\n```\nroot@workstation:~/utilities# ./auto_priv_exploit.sh \n[*] Usage: ./auto_priv_exploit.sh VERSION_OF_KERNEL\nroot@workstation:~/utilities# ls\nauto_priv_exploit.sh\nroot@workstation:~/utilities# ./auto_priv_exploit.sh 2.6\n[*] Possible Exploit\n\nLinux Kernel 2.4.x / 2.6.x - uselib() Local Privilege Escalation Exploit                                           | /linux/local/895.c\nLinux Kernel 2.4 / 2.6 - bluez Local Root Privilege Escalation Exploit (3)                                         | /linux/local/926.c\nPostfix \u003c= 2.6-20080814 - (symlink) Local Privilege Escalation Exploit                                             | /linux/local/6337.sh\nLinux Kernel \u003c 2.6.29 - exit_notify() Local Privilege Escalation Exploit                                           | /linux/local/8369.sh\nLinux Kernel 2.6 - UDEV Local Privilege Escalation Exploit                                                         | /linux/local/8478.sh\nLinux Kernel 2.6 UDEV \u003c 141 - Local Privilege Escalation Exploit                                                   | /linux/local/8572.c\nLinux Kernel 2.6.x - ptrace_attach Local Privilege Escalation Exploit                                              | /linux/local/8673.c\nLinux Kernel \u003c= 2.6.34-rc3 ReiserFS xattr - Privilege Escalation                                                   | /linux/local/12130.py\nLinux Kernel \u003c 2.6.36-rc1 CAN BCM - Privilege Escalation Exploit                                                   | /linux/local/14814.c\nLinux Kernel \u003c 2.6.36-rc4-git2 - x86_64 ia32syscall Emulation Privilege Escalation                                 | /linux/local/15023.c\nLinux Kernel \u003c= 2.6.36-rc8 - RDS Protocol Local Privilege Escalation                                               | /linux/local/15285.c\nLinux Kernel \u003c= 2.6.37 - Local Privilege Escalation                                                                | /linux/local/15704.c\nLinux Kernel \u003c 2.6.37-rc2 - ACPI custom_method Privilege Escalation                                                | /linux/local/15774.c\nLinux Kernel 2.6.34 - CAP_SYS_ADMIN x86 - Local Privilege Escalation Exploit                                       | /linux/local/15916.c\nLinux Kernel \u003c 2.6.34 - CAP_SYS_ADMIN x86 \u0026 x64 - Local Privilege Escalation Exploit (2)                           | /linux/local/15944.c\nLinux Kernel \u003c 2.6.36.2 - Econet Privilege Escalation Exploit                                                      | /linux/local/17787.c\nLinux Kernel 2.6.17 - Sys_Tee Local Privilege Escalation Vulnerability                                             | /linux/local/29714.txt\nLinux Kernel 2.6.x - Ptrace Local Privilege Escalation Vulnerability                                               | /linux/local/30604.c\nLinux Kernel 2.6.x - 'pipe.c' Local Privilege Escalation Vulnerability (1)                                         | /linux/local/33321.c\nLinux Kernel 2.6.x - pipe.c Local Privilege Escalation Vulnerability (2)                                           | /linux/local/33322.c\nLinux Kernel 2.6.x - Ext4 - 'move extents' ioctl Local Privilege Escalation Vulnerability                          | /linux/local/33395.txt\nLinux Kernel 2.6.x - 'fasync_helper()' Local Privilege Escalation Vulnerability                                    | /linux/local/33523.c\n[*] Do you wish to download all the exploit script to current directory and compile if possible?\n1) Yes\n2) No\n#? 1\n[*] The base directory is /usr/share/exploitdb/platforms\n[*] Do you wish to compile all the exploit script written in C?\n1) Yes\n2) No\n#? 1\n**************************************************\n\n[*] Successfully Compiled 9 executable located in linux_2.6\n[*] Do you want to make a tar ball of the linux_2.6? (For convinient file transfer)\n1) Yes\n2) No\n#? 1\n[*] Auto Privilege Exploit Summary\nC file in /root/utilities/linux_2.6 has 16 files\nPython file in /root/utilities/linux_2.6 has 1 files\nPerl file in /root/utilities/linux_2.6 has 0 files\nRuby file in /root/utilities/linux_2.6 has 0 files\nTXT file in /root/utilities/linux_2.6 has 2 files\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngalongc%2FAutoLocalPrivilegeEscalation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fngalongc%2FAutoLocalPrivilegeEscalation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fngalongc%2FAutoLocalPrivilegeEscalation/lists"}