
使用说明:
netexec Net-Square Remote Command Execution Tool netexec
NAME netexec - Remote Command Execution Tool
SYNOPSIS netexec [-?] [<computer name>] [-u <user>] [-p <password>] [-dir <directory>] [-cp] [-i] [-nowait] [-upload <filename>] [-download <filename>] [-script <filename>] [-e <cmdname>] [<program>] [-args <arguments>] [-shell]
DESCRIPTION NetExec allows you to execute a command on a remote machine without physically logging in to that machine. Full interactivity for console applications is provided. This tool helps system administrators in performing housekeeping tasks and security auditors in running programs on remote systems when direct access is not always possible.
OPTIONS Command line options are described below. *All options are case sensitive*
<computer> Remote computer name or IP address. This is a mandatory parameter. -u <user> Username for logging on remote computer. Logs in with current credentials if not supplied. -p <password> Password for logging on remote computer. Prompts for password, if not supplied. -dir <directory> Set remote computer's working directory. The default is %SystemRoot%\system32\ -cp First copy the specified program on the remote machine. The application must be in the system's current directory. -i Allow remote program to interact with the desktop. -upload <file> Upload file on the remote computer's working directory. -download <file> Download file from the remote computer's working directory. -nowait Do not wait for the program to complete. -script <file> Record an entire session to a <file>. -e <cmd> Execute this program from the remote machine, it should be available in the remote computer's working directory. -?/-h Displays help message. <program> Execute this program from the remote machine, it should be available in the remote computer's working directory. -args <arguments> Supply arguments of program.
-shell Use %COMSPEC% to run the shell. In absence of program, this is the default behaviour. This will execute in the absence of a program to be executed on the remote machine.
The runtime menu can be obtained by pressing the Ctrl+C key combination once. Ctrl+U:Upload file Ctrl+D:Download file Ctrl+X:Cancel Ctrl+C:Terminate process
EXAMPLES To launch an interactive command prompt on 10.10.8.7 using administrator credentials : c:\> netexec 10.10.8.7 -u administrator cmd
To upload the file a.exe on the remote system. The directory on the remote system is set to c:\myprogram\. Only files in the current directory on the local system can be uploaded. c:\> netexec 10.10.8.7 -u administrator -upload a.exe -dir c:\myprogram\
To execute the application a.exe on the remote system : (ensure that the file a.exe exists on the remote system) c:\> netexec 10.10.8.7 -u administrator a.exe -dir c:\myprogram\ To copy and execute the application myexe.exe on a remote system without leaving a copy of the application on the remote machine, c:\> netexec 10.10.8.7 -u administrator -cp myexe.exe
To connect to a remote host by the name "foo" with the currently logged in user抯 credentials and obtain a shell c:\> netexec foo
SEE ALSO netps - Process enumerator netport - port to process mapper netservice - Services Management Tool netxslt - Xml To Html Convertor
|