Metasploit mailing list archives

Problems with multicommand


From: carlos_perez at darkoperator.com (Carlos Perez)
Date: Mon, 12 Oct 2009 19:28:53 -0400

Multicommand is for running windows command on the target box, since dir is
a function of the cmd shell and not a executable that is why it fails, I
recommend that you append cmd /c to the command to tell cmd.exe what command
to run, it will not run Meterpreter Commands. Here is an example on it's
use.

Cheers,
Carlos
meterpreter > run multicommand -c "cmd /c dir"
[*] Running Command List ...
[*]     running command cmd /c dir
*****************************************
      Output of cmd /c dir
*****************************************
 Volume in drive C has no label.
 Volume Serial Number is B411-9F93

 Directory of C:\Documents and Settings\Administrator\Desktop

10/12/2009  07:22 PM    <DIR>          .
10/12/2009  07:22 PM    <DIR>          ..
08/23/2009  02:59 PM             4,663 meterpreter.exe
05/12/2009  07:22 AM           228,152 newsid.exe
05/25/2009  02:50 PM             1,105 SQL Server Management Studio.lnk
05/27/2009  11:43 PM            48,490 SQL2k5Audit.sql
               4 File(s)        282,410 bytes
               2 Dir(s)   3,924,193,280 bytes free
meterpreter > run multicommand -c "cmd /c dir,ipconfig"
[*] Running Command List ...
[*]     running command cmd /c dir
[*]     running command ipconfig
*****************************************
      Output of cmd /c dir
*****************************************
 Volume in drive C has no label.
 Volume Serial Number is B411-9F93

 Directory of C:\Documents and Settings\Administrator\Desktop

10/12/2009  07:22 PM    <DIR>          .
10/12/2009  07:22 PM    <DIR>          ..
08/23/2009  02:59 PM             4,663 meterpreter.exe
05/12/2009  07:22 AM           228,152 newsid.exe
05/25/2009  02:50 PM             1,105 SQL Server Management Studio.lnk
05/27/2009  11:43 PM            48,490 SQL2k5Audit.sql
               4 File(s)        282,410 bytes
               2 Dir(s)   3,924,189,184 bytes free
*****************************************
      Output of ipconfig
*****************************************

Windows IP Configuration


Ethernet adapter Local Area Connection:

   Connection-specific DNS Suffix  . :
   IP Address. . . . . . . . . . . . : 192.168.1.108
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 192.168.1.1
meterpreter >




On Mon, Oct 12, 2009 at 5:03 PM, David Gomes <skysbsb at gmail.com> wrote:

Hi, there is a problem with multicommand or i am making something wrong?

meterpreter > run multicommand -c "dir;"
[*] Running Command List ...
[*]     running command dir;
[*] Error Running Command dir;: Rex::Post::Meterpreter::RequestError
stdapi_sys_process_execute: Operation failed: 2

meterpreter > run multicommand -c "dir"
[*] Running Command List ...
[*]     running command dir
[*] Error Running Command dir: Rex::Post::Meterpreter::RequestError
stdapi_sys_process_execute: Operation failed: 2

meterpreter > getuid
Server username: COMPUTADOR01\Lan House
meterpreter > run multicommand -c "migrate"
[*] Running Command List ...
[*]     running command migrate
[*] Error Running Command migrate: Rex::Post::Meterpreter::RequestError
stdapi_sys_process_execute: Operation failed: 2

meterpreter >


# svn info
Path: .
URL: https://metasploit.com/svn/framework3/trunk
Repository Root: https://metasploit.com/svn
Repository UUID: 4d416f70-5f16-0410-b530-b9f4589650da
Revision: 7150
Node Kind: directory
Schedule: normal
Last Changed Author: hdm
Last Changed Rev: 7150
Last Changed Date: 2009-10-12 11:42:51 -0300 (Mon, 12 Oct 2009)

_______________________________________________
https://mail.metasploit.com/mailman/listinfo/framework


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.metasploit.com/pipermail/framework/attachments/20091012/a96a37ad/attachment-0001.html>


Current thread: