Warning: file_exists(): open_basedir restriction in effect. File(/tmp/mysql.sock) is not within the allowed path(s): (/home/remiphpcgi1781051155/:/usr/share/) in /home/remiphpcgi1781051155/remiphp-cgi.178-105-115-5.myboltip.com/public_html/index.php on line 154

Warning: file_exists(): open_basedir restriction in effect. File(/tmp/.s.PGSQL.5432) is not within the allowed path(s): (/home/remiphpcgi1781051155/:/usr/share/) in /home/remiphpcgi1781051155/remiphp-cgi.178-105-115-5.myboltip.com/public_html/index.php on line 154

Warning: file_exists(): open_basedir restriction in effect. File(/var/lib/mysql/mysql.sock) is not within the allowed path(s): (/home/remiphpcgi1781051155/:/usr/share/) in /home/remiphpcgi1781051155/remiphp-cgi.178-105-115-5.myboltip.com/public_html/index.php on line 154
Tenant Isolation & Impersonation Test

Tenant Isolation & Impersonation Test

SAPI: cgi-fcgi · PHP: 8.4.22 · Host: www.remiphp-cgi.178-105-115-5.myboltip.com · DOC_ROOT: /home/remiphpcgi1781051155/remiphp-cgi.178-105-115-5.myboltip.com/public_html · Tenant: remiphpcgi1781051155

Target other tenant:  [plant /tmp secret]  [plant into /home/bobi/tmp]  [clean]

1) open_basedir

CheckValueResultNote
open_basedir/home/remiphpcgi1781051155/:/usr/share/PASSrestriction set
read /etc/passwddeniedPASSblocked
list /etcdeniedPASSblocked
list / (root)deniedPASSblocked
list /home (tenant enumeration)deniedPASSblocked
read /etc/shadowdeniedPASSblocked (DAC/basedir)

2) /tmp cross-tenant leak


Warning: file_exists(): open_basedir restriction in effect. File(/tmp/pentest_public_html_2aaf2e5ed3a52a64f22a3729359e2e09.txt) is not within the allowed path(s): (/home/remiphpcgi1781051155/:/usr/share/) in /home/remiphpcgi1781051155/remiphp-cgi.178-105-115-5.myboltip.com/public_html/index.php on line 506
CheckValueResultNote
this tenant tmp file/tmp/pentest_public_html_2aaf2e5ed3a52a64f22a3729359e2e09.txtPASSnot planted yet
other tenants /tmp markersnonePASSno foreign pentest_* visible
/tmp/sess_* leaknonePASSno foreign sess_* readable
/tmp/mysql.sock exists?noPASSnot present
/tmp/.s.PGSQL.5432 exists?noPASSnot present
/var/lib/mysql/mysql.sock exists?noPASSnot present

3) suEXEC / process identity

CheckValueResultNote
PHP process userremiphpcgi1781051155 (uid=? gid=? real_uid=?)PASSlooks per-user
Process groupsPASSmust NOT be in "apache" group (would allow reading other FPM sockets)
Expected owner from DOC_ROOTremiphpcgi1781051155PASSmatches
Newly-written file owner2002FAILwrong owner

4) Cross-tenant impersonation (target: bobi)

ProbeResultStatusNote
stat /home/bobideniedPASSblocked
list /home/bobideniedPASSblocked
list /home/bobi/public_htmldeniedPASSblocked
read /home/bobi/.bashrcdeniedPASSblocked
read /home/bobi/.bash_historydeniedPASSblocked
read /home/bobi/.ssh/authorized_keysdeniedPASSblocked
read /home/bobi/.ssh/id_rsadeniedPASSblocked
list /home/bobi/tmp/sessionsdeniedPASSblocked
write to /home/bobi/tmp/deniedPASSblocked
common config files (wp-config/.env/etc.)none readablePASSblocked

5) open_basedir bypass tricks

TrickResultStatusNote
symlink to /etc/passwdblockedPASSblocked
symlink /tmp -> /home/bobi/.bashrcblockedPASSblocked
glob:// /etc/*blocked (only tz symlink resolved into /usr/share)PASSblocked
glob:// /root/*blockedPASSblocked
phar:// write testn/aN/Aself-target — not a cross-tenant probe
chdir + ../ escapeblockedPASSblocked
realpath() outside basedirnullPASSblocked

6) disable_functions & command execution

FunctionStateStatusNote
execdisabledPASS
shell_execdisabledPASS
systemdisabledPASS
passthrudisabledPASS
proc_opendisabledPASS
popendisabledPASS
pcntl_execdisabledPASS
mailENABLEDPASS
imap_opendisabledPASS
dldisabledPASS
putenvENABLEDPASS
posix_killdisabledPASS
posix_setuiddisabledPASS
posix_seteuiddisabledPASS
actual `id` output(all blocked) backtick=EXC:Call to undefined function shell_exec()PASSall exec attempts blocked

7) /proc enumeration

CheckValueStatusNote
list /procdeniedPASSblocked
read /proc/self/statusdeniedPASSblocked
read /proc/<PID>/environ or cmdline of other PIDsnonePASSblocked

8) Privilege escalation / FPM socket impersonation

ProbeResultStatusNote
posix_setuid(0)disabledPASSexpected to fail
posix_seteuid(0)disabledPASSexpected to fail
list /run *.sockdenied/nonePASSblocked
connect to foreign FPM socketn/aN/Anothing foreign to test against

raw php config

SettingValue
open_basedir/home/remiphpcgi1781051155/:/usr/share/
disable_functionspcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,exec,passthru,shell_exec,system,proc_open,proc_close,proc_get_status,proc_nice,proc_terminate,popen,dl,show_source,posix_kill,posix_mkfifo,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
upload_tmp_dir/home/remiphpcgi1781051155/tmp
sys_temp_dir/home/remiphpcgi1781051155/tmp
session.save_path/home/remiphpcgi1781051155/tmp/sessions
sendmail_path/usr/sbin/sendmail -t -i

Tip: deploy this same file to /home/bobi/... and visit both vhosts. Use ?action=plant on tenant A, then visit tenant B with ?other=remiphpcgi1781051155 — section 4 should show all PASS.