Skip to content

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

Merged
NeffIsBack merged 8 commits into
Pennyw0rth:mainfrom
joaovarelas:main
Aug 24, 2024
Merged

Add module to lookup hostname of Hyper-V host - 'hyperv-host.py'#374
NeffIsBack merged 8 commits into
Pennyw0rth:mainfrom
joaovarelas:main

Conversation

@joaovarelas

@joaovarelas joaovarelas commented Jul 19, 2024

Copy link
Copy Markdown
Contributor

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

@NeffIsBack NeffIsBack left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thanks for the PR!

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

Copy link
Copy Markdown
Member

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
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is why:
image

Comment thread nxc/modules/hyperv-host.py
@NeffIsBack

Copy link
Copy Markdown
Member

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

Comment thread nxc/modules/hyperv-host.py
@NeffIsBack

Copy link
Copy Markdown
Member

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
Copy Markdown
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
@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