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

Add module to lookup hostname of Hyper-V host - 'hyperv-host.py' #374

Merged
merged 8 commits into from
Aug 24, 2024

Conversation

joaovarelas
Copy link
Contributor

@joaovarelas joaovarelas commented Jul 19, 2024

Hello, I created a simple module based on "reg-query.py" to query a hardcoded key and lookup the hostname of the Hyper-V Host for a target VM. It uses impacket's RRP.

Reference: https://techcommunity.microsoft.com/t5/itops-talk-blog/find-the-hostname-of-a-hyper-v-vm/ba-p/2074171

image

Copy link
Contributor

@NeffIsBack NeffIsBack left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

nxc/modules/hyperv-host.py Outdated Show resolved Hide resolved
@NeffIsBack NeffIsBack added the reviewed code Label for when a static code review was done label Jul 21, 2024
Comment on lines 28 to 29
remote_ops = RemoteOperations(connection.conn, False)
remote_ops.enableRegistry()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, missed it in the first review, but this should be wrapped inside the try...except block as well.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is why:
image

nxc/modules/hyperv-host.py Show resolved Hide resolved
@NeffIsBack
Copy link
Contributor

Gonna test the module on my next assessment, then we should be good to merge

@NeffIsBack
Copy link
Contributor

Could i take your picture for a twitter post?
If you have twitter send me your profile so i can tag you :)

@joaovarelas
Copy link
Contributor Author

Could i take your picture for a twitter post? If you have twitter send me your profile so i can tag you :)

Sure! I am ok with that. My twitter handle is the same @joaovarelas

Thank you

@NeffIsBack NeffIsBack merged commit 83514bf into Pennyw0rth:main Aug 24, 2024
7 checks passed
@mpgn mpgn added this to the v1.3.0 milestone Sep 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new module reviewed code Label for when a static code review was done
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants