Sha256: 91ed65dd3f76c18040ee1d5a52ef4f8b8775c8d703f35d60b8b09c01c5d0ed27

Contents?: true

Size: 716 Bytes

Versions: 12

Compression:

Stored size: 716 Bytes

Contents

# frozen_string_literal: true

module WPScan
  module Finders
    module InterestingFindings
      # UploadSQLDump finder
      class UploadSQLDump < CMSScanner::Finders::Finder
        SQL_PATTERN = /(?:DROP|CREATE|(?:UN)?LOCK) TABLE|INSERT INTO/.freeze

        # @return [ InterestingFinding ]
        def aggressive(_opts = {})
          path = 'wp-content/uploads/dump.sql'
          res  = target.head_and_get(path, [200], get: { headers: { 'Range' => 'bytes=0-3000' } })

          return unless SQL_PATTERN.match?(res.body)

          Model::UploadSQLDump.new(
            target.url(path),
            confidence: 100,
            found_by: DIRECT_ACCESS
          )
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
wpscan-3.7.9 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.8 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.7 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.6 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.5 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.4 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.3 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.2 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.1 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.7.0 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.6.3 app/finders/interesting_findings/upload_sql_dump.rb
wpscan-3.6.2 app/finders/interesting_findings/upload_sql_dump.rb