Ethical Hacking

Learn to find vulnerabilities before the bad guys do! Gain real world hands on hacking experience in our state of the art hacking lab. Course designed and taught by expert instructors with years of penetration testing experience. 12 student maximum in every class. Certification attempt included in every package.
Computer Forensics Training at InfoSec Institute

Gain the in-demand skills of a certified computer examiner, learn to recover trace data left behind by fraud, theft, and cybercrime perpetrators. Discover the source of computer crime and abuse at your organization so that it never happens again. All of our class sizes are guaranteed to be 12 students or less to facilitate one-on-one interaction with one of our expert instructors.




Network Security Exploits-HackingTools
[Top] [All Lists]

[UNIX] Net::Server's log() Function Syslog Usage Allows for a Format Str

Subject: [UNIX] Net::Server's log() Function Syslog Usage Allows for a Format String Vulnerability
Date: 25 Apr 2005 18:36:18 +0200
The following security advisory is sent to the securiteam mailing list, and can 
be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html 

- - - - - - - - -



  Net::Server's log() Function Syslog Usage Allows for a Format String 
Vulnerability
------------------------------------------------------------------------


SUMMARY

The undocumented but frequently used "log" function provided by the 
Net::Server Perl module is not safe against format string vulnerability.

DETAILS

Vulnerable Systems:
 * Net::Server version 0.87

The syslog call in function log is implemented like following:
  ### log only to syslog if setup to do syslog
  if( $prop->{log_file} eq 'Sys::Syslog' ){
    $level = $level!~/^\d+$/ ? $level : $Net::Server::syslog_map->{$level} 
;
    Sys::Syslog::syslog($level,@_);   <---!!!!!!
    return;
  }

Sys::Syslog tells how to use function "syslog":
       syslog $priority, $format, @args
           If $priority permits, logs ($format, @args) printed as by
           "printf(3V)", with the addition that %m is replaced with "$!" 
(the latest error message).

Unfortunately, the function "log" of Net::Server put now the first given 
log argument into "syslog" function as format string, and the others as 
arguments.

Workaround:
As a workaround, programs using "log" of Net::Server can replace a single 
"%" by "%%", but only in case of when syslog is used.

Impact of workaround: programs which call "log" of Net::Server with format 
string in first log argument will break.


ADDITIONAL INFORMATION

The information has been provided by  <mailto:pbieringer@aerasec.de> Dr. 
Peter Bieringer.



======================================== 


This bulletin is sent to members of the SecuriTeam mailing list. 
To unsubscribe from the list, send mail with an empty subject line and body to: 
list-unsubscribe@securiteam.com 
In order to subscribe to the mailing list, simply forward this email to: 
list-subscribe@securiteam.com 


==================== 
==================== 

DISCLAIMER: 
The information in this bulletin is provided "AS IS" without warranty of any 
kind. 
In no event shall we be liable for any damages whatsoever including direct, 
indirect, incidental, consequential, loss of business profits or special 
damages. 




<Prev in Thread] Current Thread [Next in Thread>
  • [UNIX] Net::Server's log() Function Syslog Usage Allows for a Format String Vulnerability, SecuriTeam <=