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

How can i get / see 'exploit uuid' while executing with "run_module_with_output" #18

Open
mmali277 opened this issue Aug 13, 2019 · 1 comment
Labels
enhancement New feature or request

Comments

@mmali277
Copy link

I want to get the exploit uuid which in case of exploit.execute is following:


>>> exploit.execute(payload='cmd/unix/interact')
{'job_id': 1, 'uuid': '3whbuevf'}
>>>

but when running with output, that is

(client.consoles.console(cid).run_module_with_output(exploit, payload='cmd/unix/interact'))

there is no such type of dictionary available.
What i actually want to do is match the 'uuid' (as given by exploit.execute()) with the 'exploit uuid' with any of the available sessions from sessions list client.sessions.list

for example: in case of exploit.execute() :

>>> exploit.execute(payload='cmd/unix/interact')
{'job_id': 1, 'uuid': '3whbuevf'}
>>>

>>> client.sessions.list
{1: {'info': '', 'username': 'jsmith', 'session_port': 21, 'via_payload': 'payload/cmd/unix/interact',
'uuid': '5orqnnyv', 'tunnel_local': '172.16.14.1:58429', 'via_exploit': 'exploit/unix/ftp/vsftpd_234_backdoor',
'exploit_uuid': '3whbuevf', 'tunnel_peer': '172.16.14.145:6200', 'workspace': 'false', 'routes': '',
'target_host': '172.16.14.145', 'type': 'shell', 'session_host': '172.16.14.145', 'desc': 'Command shell'}}
>>>

the 'uuid' of exploit.execute() and 'exploit_uuid' of session:1 from client.sessions.list matches.

That is what i want to do with (client.consoles.console(cid).run_module_with_output(exploit, payload='cmd/unix/interact'))

@DanMcInerney DanMcInerney added the enhancement New feature or request label Aug 19, 2019
@DanMcInerney
Copy link
Owner

Hmm, I'll have to think about how to implement this one. Not sure just yet.

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

No branches or pull requests

2 participants