SUID Priv Escalation – LD_LIBRARY_PATH versus ldconfig and /etc/ld.so.conf

Background
Currently doing some vulnservers on Offensive Security’s Proving Grounds Practice Labs. A vulnserver is a machine configured with vulnerabilities for testing/audit and research purposes.
I came across a machine that had a cronjo… Continue reading SUID Priv Escalation – LD_LIBRARY_PATH versus ldconfig and /etc/ld.so.conf

Bash – SUID Program’s Child Process did not inherit Parent Process UID as EUID

Background
In practicing pentesting a VM on Vulnhub I encountered an issue that is quite interesting with Brainpan. After initial access with a limited shell generated from a BoF exploit on a service running on port 9999, I did some basic … Continue reading Bash – SUID Program’s Child Process did not inherit Parent Process UID as EUID

Does sudo ever de-escalate privilege while the program/command/service is running?

For Example

Is it safer to do:

$ sudo [cmd] [args] [enter user password]

or

$ su – [enter root password]
# [cmd] [args]

I always assumed they are the exact same thing, because sudo utilizes setuid-root, so the process that is … Continue reading Does sudo ever de-escalate privilege while the program/command/service is running?

Metasploit MsfVenom – Payload binds shell, but unable to spawn it with netcat

Running a SEH BoF exploit script that contains a payload that is generated from msfvenom as such:

msfvenom –payload windows/shell/bind_tcp –format py –arch x86 –platform windows –bad-chars “\x00\x20” EXITFUNC=seh

Aft… Continue reading Metasploit MsfVenom – Payload binds shell, but unable to spawn it with netcat