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

sysinfo['Computer'] returns IP address not hostname on Linux sessions #17289

Open
bcoles opened this issue Nov 22, 2022 · 0 comments
Open

sysinfo['Computer'] returns IP address not hostname on Linux sessions #17289

bcoles opened this issue Nov 22, 2022 · 0 comments

Comments

@bcoles
Copy link
Contributor

bcoles commented Nov 22, 2022

rapid7/mettle#239

On Meterpreter sessions on Windows session.sys.config.sysinfo['Computer'] returns the system hostname, whereas on Linux the host IP address is returned instead.

msf6 exploit(multi/handler) > 
[*] Sending stage (3045348 bytes) to 192.168.200.202
[*] Meterpreter session 1 opened (192.168.200.130:1337 -> 192.168.200.202:41368) at 2022-11-22 07:28:51 -0500

msf6 exploit(multi/handler) > sessions

Active sessions
===============

  Id  Name  Type                   Information             Connection
  --  ----  ----                   -----------             ----------
  1         meterpreter x64/linux  user @ 192.168.200.202  192.168.200.130:1337 -> 192.168.200.202:41368 (192.168.200.202)

msf6 exploit(multi/handler) > sessions -i 1
[*] Starting interaction with 1...

meterpreter > sysinfo
Computer     : 192.168.200.202
OS           : Ubuntu 22.04 (Linux 5.15.0-53-generic)
Architecture : x64
BuildTuple   : x86_64-linux-musl
Meterpreter  : x64/linux
meterpreter > 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant