Hostname in header
parent
d64f577f9a
commit
d3bb32f5fd
|
@ -24,7 +24,7 @@ class Metasploit3 < Msf::Post
|
|||
|
||||
# Run Method called when command run is issued
|
||||
def run
|
||||
print_good("Running the post module: #{name} on" + session.shell_command('$env:COMPUTERNAME'))
|
||||
print_good("Running the post module: #{name} on: " + session.shell_command('$env:COMPUTERNAME').gsub!(/(\r\n)/, ''))
|
||||
|
||||
pscommand='$root = New-Object DirectoryServices.DirectoryEntry "LDAP://RootDSE"; $root.Properties["dnsHostName"][0].ToString()'
|
||||
print(session.shell_command(pscommand))
|
||||
|
|
|
@ -24,8 +24,7 @@ class Metasploit3 < Msf::Post
|
|||
|
||||
# Run Method called when command run is issued
|
||||
def run
|
||||
print_good("Running the post module: #{name} on" + session.shell_command('$env:COMPUTERNAME'))
|
||||
|
||||
print_good("Running the post module: #{name} on: " + session.shell_command('$env:COMPUTERNAME').gsub!(/(\r\n)/, ''))
|
||||
pscommand='net accounts /domain'
|
||||
print(session.shell_command(pscommand))
|
||||
end
|
||||
|
|
|
@ -24,8 +24,7 @@ class Metasploit3 < Msf::Post
|
|||
|
||||
# Run Method called when command run is issued
|
||||
def run
|
||||
print_good("Running the post module: #{name} on" + session.shell_command('$env:COMPUTERNAME'))
|
||||
|
||||
print_good("Running the post module: #{name} on: " + session.shell_command('$env:COMPUTERNAME').gsub!(/(\r\n)/, ''))
|
||||
# Find all domain users
|
||||
pscommand = '$searcher = new-object System.DirectoryServices.DirectorySearcher ; $searcher.filter = "(&(objectClass=user)(sAMAccountName=*))"; $colResults = $searcher.findall()'
|
||||
print(session.shell_command(pscommand))
|
||||
|
|
|
@ -24,8 +24,7 @@ class Metasploit3 < Msf::Post
|
|||
|
||||
# Run Method called when command run is issued
|
||||
def run
|
||||
print_good("Running the post module: #{name} on" + session.shell_command('$env:COMPUTERNAME'))
|
||||
|
||||
print_good("Running the post module: #{name} on: " + session.shell_command('$env:COMPUTERNAME').gsub!(/(\r\n)/, ''))
|
||||
# Enumerate powershell version
|
||||
pscommand='$psversiontable'
|
||||
print(session.shell_command(pscommand))
|
||||
|
|
|
@ -24,8 +24,7 @@ class Metasploit3 < Msf::Post
|
|||
|
||||
# Run Method called when command run is issued
|
||||
def run
|
||||
print_good("Running the post module: #{name} on" + session.shell_command('$env:COMPUTERNAME'))
|
||||
|
||||
print_good("Running the post module: #{name} on: " + session.shell_command('$env:COMPUTERNAME').gsub!(/(\r\n)/, ''))
|
||||
# Get all the services that are not in "C:\Windows\System32\"
|
||||
pscommand = '$services = Get-WmiObject win32_service | ?{$_} | where {($_.pathname -ne $null) -and ($_.pathname -notmatch ".*system32.*")} ; $servicepaths = New-Object System.Collections.ArrayList'
|
||||
print(session.shell_command(pscommand))
|
||||
|
|
Loading…
Reference in New Issue