Skip to content
KitploitKITPLOIT
ToolsBlog
Submit
ToolsBlog
Submit

Hacking, PenTest, and Cybersecurity Tools for Your Security Arsenal!

Kitploit is a directory of hacking, cybersecurity, and pentesting tools. Discover the latest project updates to find vulnerabilities, analyze systems, automate testing, and strengthen your security.

··Feeds·Contact·Privacy·© 2026 Kitploit

Tool Directory

Categories

View all categories
Loading categories
bypass_disablefunc_via_LD_PRELOAD — 解决php提权的时候因系统禁用函数导致无法执行命令的情况 | Kitploit
Tools/GitHubGitHub/ianxtianxt/bypass_disablefunc_via_ld_preload
Privilege EscalationExploitationWeb Application ExploitationPost-ExploitationPenetration TestingRed TeamingPayload Development
GitHubianxtianxt/bypass_disablefunc_via_ld_preload

Most Popular

View all →

Discover the most used tools by our community.

Explore all tools

Browse our collection of tools

View all tools →
Share

bypass_disablefunc_via_LD_PRELOAD

解决php提权的时候因系统禁用函数导致无法执行命令的情况

View Repository
636 years agoNot yet reviewed

bypass_disablefunc.php has three GET options: cmd, outpath and sopath.

The options are very simple,

cmd is your evil command,

outpath is the output file path of the command (readable and writable),

sopath is the absolute path of our shared object bypass_disablefunc_x64.so. For example:

http://site.com/bypass_disablefunc.php?cmd=pwd&outpath=/tmp/xx&sopath=/var/www/bypass_disablefunc_x64.so

The first is the cmd parameter, the system command to be executed (such as pwd);

The second is the outpath parameter, the file path for saving the command execution output (such as / tmp / xx), so that it can be displayed on the page. In addition, regarding this parameter, you should note whether the web has read/write permission, whether the web can access it across directories, and that the file will be overwritten and deleted;

The third is the sopath parameter, which specifies the absolute path of the shared object that hijacks system functions (such as /var/www/bypass_disablefunc_x64.so). Also, regarding this parameter, you should note whether the web can access it across directories.

In addition, bypass_disablefunc.php concatenates the command and the output path into a complete command line, so you don't need to redirect in the cmd parameter.

bypass_disablefunc_x64.so is a shared object for executing commands, compiled using the command gcc -shared -fPIC bypass_disablefunc.c -o bypass_disablefunc_x64.so

It is compiled from bypass_disablefunc.c. If the target is an x86 architecture, you need to add the -m32 option and recompile bypass_disablefunc_x86.so.

Find a way to upload bypass_disablefunc.php and bypass_disablefunc_x64.so to the target. After specifying the three GET parameters, bypass_disablefunc.php can bypass disable_functions.

Known issues:

  1. Different target environments may require recompiling the shared object. The bypass_disablefunc_x64.so in this project was compiled on Debian, x64. On non-Debian systems, it may need to be recompiled;
  2. bypass_disablefunc.php needs read/write permission on the path specified by outpath. If SELinux is enabled on the target, it may prevent the web account from writing files. For example, if you run id as the apache user, the output is uid=48(apache) gid=48(apache) groups=48(apache) context=system_u:system_r:httpd_t:s0. See the trailing context=system_u:system_r:httpd_t:s0? That's SELinux at work.
Download Tool