Nmap Development mailing list archives
Re: running a batch script remotely through smb-psexec
From: Daniel Miller <bonsaiviking () gmail com>
Date: Mon, 22 Dec 2014 15:21:13 -0600
Ozzy, I can't really answer your question at the moment, but since you're having problems with your mail not showing up, my reply should make it readable for other members of the list. Your mail client is including both a text and an HTML version of your email (a standard practice), but the text version is completely empty (not standard). Our web archiver uses the text version, so you can't see anything there, but anyone receiving the email directly from the list should be able to read it. Dan On Tue, Dec 16, 2014 at 7:37 AM, אוזי אוז <ozzythehacker () walla co il> wrote:
hello, i'm posting my question here, as reccommanded in the smb-psexec page http://nmap.org/nsedoc/scripts/smb-psexec.html if i'm at the wrong place, please let me know and direct me to the right place. so, i'm trying to run a batch script i wrote through smb-psexec. i have the configuration file mentioning all the appropriate configuration about my script and everything. it uploads the file to the remote computer successfully, however, it fails to run with the following error: "Failed to create the process" while one of the files created on the remote computer says the following: "This program cannot be run in DOS mode" my batch file runs fine locally on the computer, as well as if i place it on the computer and run it remotely through smb-psexec (just without uploading it). o after some investigation, i found out that my bat file fails to run as it is uploaded to the remote computer with an obfuscated name that changes the file type (something like randomname.txt). i tried changing the smb-psexec.nse script not to obfuscate my batch file name, and it ran successfully and returned the correct results. and so, i'm probably doing something wrong here, but i can't figure out what is it that i'm doing wrong. if someone can direct me as to how i should do it correctly without having to change the smb-psexec.nse script it would be wonderful. my conf file looks like this: mod = {} mod.upload = true mod.name = "Ori Zuckerman King Test" mod.path = "c:/nmap" mod.program = "test.bat" table.insert(modules, mod) and the commandline looks like this: nmap -n -d -p445 -script=smb-psexec --script-args=smbuser=someuser,smbpass=somepass,config=psexec_conf,share=nmap,sharepath="c:\nmap" 1.1.1.1 where the user/pass and ip of course are changed to the correct one. any help is much appreciated. thanks Ozzy ------------------------------ Walla! Mail - Get your free unlimited mail today <http://www.walla.co.il> _______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
_______________________________________________ Sent through the dev mailing list http://nmap.org/mailman/listinfo/dev Archived at http://seclists.org/nmap-dev/
Current thread:
- running a batch script remotely through smb-psexec אוזי אוז (Dec 16)
- <Possible follow-ups>
- running a batch script remotely through smb-psexec אוזי אוז (Dec 16)
- running a batch script remotely through smb-psexec אוזי אוז (Dec 22)
- Re: running a batch script remotely through smb-psexec Daniel Miller (Dec 22)