SQLMAP源码分析-目录结构

-----------------------------------------------------------------------------
│  README.md
│  sqlmap.conf[主配置文件]
│  sqlmap.py[主程序]
│  sqlmapapi.py[api接口]
│ 
├─doc[帮助文档]
│  │  AUTHORS
│  │  CHANGELOG.md
│  │  CONTRIBUTING.md
│  │  COPYING
│  │  FAQ.pdf
│  │  README.pdf
│  │  THANKS.md
│  │  THIRD-PARTY.md
│  │ 
│  └─translations
│          README-es-MX.md
│          README-fr-FR.md
│          README-gr-GR.md
│          README-hr-HR.md
│          README-id-ID.md
│          README-it-IT.md
│          README-ja-JP.md
│          README-pt-BR.md
│          README-tr-TR.md
│          README-zh-CN.md
│         
├─extra[扩展程序(包含了多种额外功能,声音、cmd、安全执行、shellcode等)]
│  │  __init__.py
│  │ 
│  ├─beep
│  │      beep.py
│  │      beep.wav
│  │      __init__.py
│  │     
│  ├─cloak
│  │      cloak.py
│  │      README.txt
│  │      __init__.py
│  │     
│  ├─dbgtool
│  │      dbgtool.py
│  │      README.txt
│  │      __init__.py
│  │     
│  ├─icmpsh
│  │      icmpsh-m.c
│  │      icmpsh-m.pl
│  │      icmpsh-s.c
│  │      icmpsh.exe_
│  │      icmpsh_m.py
│  │      README.txt
│  │      __init__.py
│  │     
│  ├─mssqlsig
│  │      update.py
│  │     
│  ├─runcmd
│  │  │  README.txt
│  │  │ 
│  │  └─windows
│  │      │  README.txt
│  │      │  runcmd.sln
│  │      │ 
│  │      └─runcmd
│  │              runcmd.cpp
│  │              runcmd.vcproj
│  │              stdafx.cpp
│  │              stdafx.h
│  │             
│  ├─safe2bin
│  │      README.txt
│  │      safe2bin.py
│  │      __init__.py
│  │     
│  ├─shellcodeexec
│  │  │  README.txt
│  │  │ 
│  │  ├─linux
│  │  │      shellcodeexec.x32_
│  │  │      shellcodeexec.x64_
│  │  │     
│  │  └─windows
│  │          shellcodeexec.x32.exe_
│  │         
│  ├─shutils
│  │      blanks.sh
│  │      duplicates.py
│  │      pep8.sh
│  │      postcommit-hook.sh
│  │      precommit-hook.sh
│  │      pyflakes.sh
│  │      pylint.py
│  │      pypi.sh
│  │      regressiontest.py
│  │      strip.sh
│  │     
│  └─sqlharvest
│          sqlharvest.py
│          __init__.py
│         
├─lib[类库程序(包含各种链接库,例如五种注入类型请求的参数、提权等操作)]
│  │  __init__.py
│  │ 
│  ├─controller
│  │      action.py
│  │      checks.py
│  │      controller.py
│  │      handler.py
│  │      __init__.py
│  │     
│  ├─core
│  │      agent.py
│  │      bigarray.py
│  │      common.py
│  │      convert.py
│  │      data.py
│  │      datatype.py
│  │      decorators.py
│  │      defaults.py
│  │      dicts.py
│  │      dump.py
│  │      enums.py
│  │      exception.py
│  │      log.py
│  │      option.py
│  │      optiondict.py
│  │      profiling.py
│  │      readlineng.py
│  │      replication.py
│  │      revision.py
│  │      session.py
│  │      settings.py
│  │      shell.py
│  │      subprocessng.py
│  │      target.py
│  │      testing.py
│  │      threads.py
│  │      unescaper.py
│  │      update.py
│  │      wordlist.py
│  │      __init__.py
│  │     
│  ├─parse
│  │      banner.py
│  │      cmdline.py
│  │      configfile.py
│  │      handler.py
│  │      headers.py
│  │      html.py
│  │      payloads.py
│  │      sitemap.py
│  │      __init__.py
│  │     
│  ├─request
│  │      basic.py
│  │      basicauthhandler.py
│  │      comparison.py
│  │      connect.py
│  │      direct.py
│  │      dns.py
│  │      httpshandler.py
│  │      inject.py
│  │      methodrequest.py
│  │      pkihandler.py
│  │      rangehandler.py
│  │      redirecthandler.py
│  │      templates.py
│  │      __init__.py
│  │     
│  ├─takeover
│  │      abstraction.py
│  │      icmpsh.py
│  │      metasploit.py
│  │      registry.py
│  │      udf.py
│  │      web.py
│  │      xp_cmdshell.py
│  │      __init__.py
│  │     
│  ├─techniques
│  │  │  __init__.py
│  │  │ 
│  │  ├─blind
│  │  │      inference.py
│  │  │      __init__.py
│  │  │     
│  │  ├─brute
│  │  │      use.py
│  │  │      __init__.py
│  │  │     
│  │  ├─dns
│  │  │      test.py
│  │  │      use.py
│  │  │      __init__.py
│  │  │     
│  │  ├─error
│  │  │      use.py
│  │  │      __init__.py
│  │  │     
│  │  └─union
│  │          test.py
│  │          use.py
│  │          __init__.py
│  │         
│  └─utils
│          api.py
│          crawler.py
│          deps.py
│          getch.py
│          hash.py
│          hashdb.py
│          htmlentities.py
│          pivotdumptable.py
│          progress.py
│          purge.py
│          search.py
│          sqlalchemy.py
│          timeout.py
│          versioncheck.py
│          xrange.py
│          __init__.py
│         
├─plugins[插件程序(包含各种数据库的信息和数据库通用事项)]
│  │  __init__.py
│  │ 
│  ├─dbms
│  │  │  __init__.py
│  │  │ 
│  │  ├─access
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─db2
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─firebird
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─hsqldb
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─informix
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─maxdb
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─mssqlserver
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─mysql
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─oracle
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─postgresql
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  ├─sqlite
│  │  │      connector.py
│  │  │      enumeration.py
│  │  │      filesystem.py
│  │  │      fingerprint.py
│  │  │      syntax.py
│  │  │      takeover.py
│  │  │      __init__.py
│  │  │     
│  │  └─sybase
│  │          connector.py
│  │          enumeration.py
│  │          filesystem.py
│  │          fingerprint.py
│  │          syntax.py
│  │          takeover.py
│  │          __init__.py
│  │         
│  └─generic
│          connector.py
│          custom.py
│          databases.py
│          entries.py
│          enumeration.py
│          filesystem.py
│          fingerprint.py
│          misc.py
│          search.py
│          syntax.py
│          takeover.py
│          users.py
│          __init__.py
│         
├─procs[SQL程序 MSSQL、MySQL、Oracle、Postgresql等]
│  │  README.txt
│  │ 
│  ├─mssqlserver
│  │      activate_sp_oacreate.sql
│  │      configure_openrowset.sql
│  │      configure_xp_cmdshell.sql
│  │      create_new_xp_cmdshell.sql
│  │      disable_xp_cmdshell_2000.sql
│  │      dns_request.sql
│  │      enable_xp_cmdshell_2000.sql
│  │      run_statement_as_user.sql
│  │     
│  ├─mysql
│  │      dns_request.sql
│  │      write_file_limit.sql
│  │     
│  ├─oracle
│  │      dns_request.sql
│  │     
│  └─postgresql
│          dns_request.sql
│         
├─shell[SHELL 包含多种脚本语言的shell]
│      backdoor.aspx_
│      backdoor.asp_
│      backdoor.jsp_
│      backdoor.php_
│      README.txt
│      runcmd.exe_
│      stager.aspx_
│      stager.asp_
│      stager.jsp_
│      stager.php_
│     
├─tamper[bypass脚本]
│      apostrophemask.py
│      apostrophenullencode.py
│      appendnullbyte.py
│      base64encode.py
│      between.py
│      bluecoat.py
│      chardoubleencode.py
│      charencode.py
│      charunicodeencode.py
│      commalesslimit.py
│      commalessmid.py
│      concat2concatws.py
│      equaltolike.py
│      escapequotes.py
│      greatest.py
│      halfversionedmorekeywords.py
│      htmlencode.py
│      ifnull2ifisnull.py
│      informationschemacomment.py
│      lowercase.py
│      modsecurityversioned.py
│      modsecurityzeroversioned.py
│      multiplespaces.py
│      nonrecursivereplacement.py
│      overlongutf8.py
│      percentage.py
│      randomcase.py
│      randomcomments.py
│      securesphere.py
│      space2comment.py
│      space2dash.py
│      space2hash.py
│      space2morehash.py
│      space2mssqlblank.py
│      space2mssqlhash.py
│      space2mysqlblank.py
│      space2mysqldash.py
│      space2plus.py
│      space2randomblank.py
│      sp_password.py
│      symboliclogical.py
│      unionalltounion.py
│      unmagicquotes.py
│      uppercase.py
│      varnish.py
│      versionedkeywords.py
│      versionedmorekeywords.py
│      xforwardedfor.py
│      __init__.py
│     
├─thirdparty[第三方程序 优化、保持连接、颜色设置等]
│  │  __init__.py
│  │ 
│  ├─ansistrm
│  │      ansistrm.py
│  │      __init__.py
│  │     
│  ├─beautifulsoup
│  │      beautifulsoup.py
│  │      __init__.py
│  │     
│  ├─bottle
│  │      bottle.py
│  │      __init__.py
│  │     
│  ├─chardet
│  │      big5freq.py
│  │      big5prober.py
│  │      chardetect.py
│  │      chardistribution.py
│  │      charsetgroupprober.py
│  │      charsetprober.py
│  │      codingstatemachine.py
│  │      compat.py
│  │      constants.py
│  │      cp949prober.py
│  │      escprober.py
│  │      escsm.py
│  │      eucjpprober.py
│  │      euckrfreq.py
│  │      euckrprober.py
│  │      euctwfreq.py
│  │      euctwprober.py
│  │      gb2312freq.py
│  │      gb2312prober.py
│  │      hebrewprober.py
│  │      jisfreq.py
│  │      jpcntx.py
│  │      langbulgarianmodel.py
│  │      langcyrillicmodel.py
│  │      langgreekmodel.py
│  │      langhebrewmodel.py
│  │      langhungarianmodel.py
│  │      langthaimodel.py
│  │      latin1prober.py
│  │      mbcharsetprober.py
│  │      mbcsgroupprober.py
│  │      mbcssm.py
│  │      sbcharsetprober.py
│  │      sbcsgroupprober.py
│  │      sjisprober.py
│  │      universaldetector.py
│  │      utf8prober.py
│  │      __init__.py
│  │     
│  ├─clientform
│  │      clientform.py
│  │      __init__.py
│  │     
│  ├─colorama
│  │      ansi.py
│  │      ansitowin32.py
│  │      initialise.py
│  │      win32.py
│  │      winterm.py
│  │      __init__.py
│  │     
│  ├─fcrypt
│  │      fcrypt.py
│  │      __init__.py
│  │     
│  ├─gprof2dot
│  │      gprof2dot.py
│  │      __init__.py
│  │     
│  ├─keepalive
│  │      keepalive.py
│  │      __init__.py
│  │     
│  ├─magic
│  │      magic.py
│  │      __init__.py
│  │     
│  ├─multipart
│  │      multipartpost.py
│  │      __init__.py
│  │     
│  ├─odict
│  │      odict.py
│  │      __init__.py
│  │     
│  ├─oset
│  │      LICENSE.txt
│  │      pyoset.py
│  │      _abc.py
│  │      __init__.py
│  │     
│  ├─pagerank
│  │      pagerank.py
│  │      __init__.py
│  │     
│  ├─prettyprint
│  │      prettyprint.py
│  │      __init__.py
│  │     
│  ├─pydes
│  │      pyDes.py
│  │      __init__.py
│  │     
│  ├─socks
│  │      LICENSE
│  │      socks.py
│  │      __init__.py
│  │     
│  ├─termcolor
│  │      termcolor.py
│  │      __init__.py
│  │     
│  └─xdot
│          xdot.py
│          __init__.py
│         
├─txt[爆破字典 User-Agent、表名、列名等]
│      checksum.md5
│      common-columns.txt
│      common-outputs.txt
│      common-tables.txt
│      keywords.txt
│      smalldict.txt
│      user-agents.txt
│      wordlist.zip
│     
├─udf[UDF提权 用户自定义函数]
│  │  README.txt
│  │ 
│  ├─mysql
│  │  ├─linux
│  │  │  ├─32
│  │  │  │      lib_mysqludf_sys.so_
│  │  │  │     
│  │  │  └─64
│  │  │          lib_mysqludf_sys.so_
│  │  │         
│  │  └─windows
│  │      ├─32
│  │      │      lib_mysqludf_sys.dll_
│  │      │     
│  │      └─64
│  │              lib_mysqludf_sys.dll_
│  │             
│  └─postgresql
│      ├─linux
│      │  ├─32
│      │  │  ├─8.2
│      │  │  │      lib_postgresqludf_sys.so_
│      │  │  │     
│      │  │  ├─8.3
│      │  │  │      lib_postgresqludf_sys.so_
│      │  │  │     
│      │  │  ├─8.4
│      │  │  │      lib_postgresqludf_sys.so_
│      │  │  │     
│      │  │  ├─9.0
│      │  │  │      lib_postgresqludf_sys.so_
│      │  │  │     
│      │  │  ├─9.1
│      │  │  │      lib_postgresqludf_sys.so_
│      │  │  │     
│      │  │  ├─9.2
│      │  │  │      lib_postgresqludf_sys.so_
│      │  │  │     
│      │  │  ├─9.3
│      │  │  │      lib_postgresqludf_sys.so_
│      │  │  │     
│      │  │  └─9.4
│      │  │          lib_postgresqludf_sys.so_
│      │  │         
│      │  └─64
│      │      ├─8.2
│      │      │      lib_postgresqludf_sys.so_
│      │      │     
│      │      ├─8.3
│      │      │      lib_postgresqludf_sys.so_
│      │      │     
│      │      ├─8.4
│      │      │      lib_postgresqludf_sys.so_
│      │      │     
│      │      ├─9.0
│      │      │      lib_postgresqludf_sys.so_
│      │      │     
│      │      ├─9.1
│      │      │      lib_postgresqludf_sys.so_
│      │      │     
│      │      ├─9.2
│      │      │      lib_postgresqludf_sys.so_
│      │      │     
│      │      ├─9.3
│      │      │      lib_postgresqludf_sys.so_
│      │      │     
│      │      └─9.4
│      │              lib_postgresqludf_sys.so_
│      │             
│      └─windows
│          └─32
│              ├─8.2
│              │      lib_postgresqludf_sys.dll_
│              │     
│              ├─8.3
│              │      lib_postgresqludf_sys.dll_
│              │     
│              ├─8.4
│              │      lib_postgresqludf_sys.dll_
│              │     
│              └─9.0
│                      lib_postgresqludf_sys.dll_
│                     
├─waf[防火墙WAF指纹库]
│      360.py
│      airlock.py
│      anquanbao.py
│      armor.py
│      baidu.py
│      barracuda.py
│      bigip.py
│      binarysec.py
│      blockdos.py
│      ciscoacexml.py
│      cloudflare.py
│      cloudfront.py
│      comodo.py
│      datapower.py
│      denyall.py
│      dotdefender.py
│      edgecast.py
│      expressionengine.py
│      fortiweb.py
│      generic.py
│      hyperguard.py
│      incapsula.py
│      isaserver.py
│      jiasule.py
│      knownsec.py
│      kona.py
│      modsecurity.py
│      netcontinuum.py
│      netscaler.py
│      newdefend.py
│      nsfocus.py
│      paloalto.py
│      profense.py
│      proventia.py
│      radware.py
│      requestvalidationmode.py
│      safe3.py
│      safedog.py
│      secureiis.py
│      senginx.py
│      sitelock.py
│      sonicwall.py
│      sophos.py
│      stingray.py
│      sucuri.py
│      teros.py
│      trafficshield.py
│      urlscan.py
│      uspses.py
│      varnish.py
│      wallarm.py
│      webappsecure.py
│      webknight.py
│      yundun.py
│      yunsuo.py
│      __init__.py
│     
└─xml[数据库检测payload、指纹信息]
    │  boundaries.xml
    │  errors.xml
    │  livetests.xml
    │  queries.xml
    │ 
    ├─banner
    │      cookie.xml
    │      generic.xml
    │      mssql.xml
    │      mysql.xml
    │      oracle.xml
    │      postgresql.xml
    │      server.xml
    │      servlet.xml
    │      sharepoint.xml
    │      x-aspnet-version.xml
    │      x-powered-by.xml
    │     
    └─payloads
            boolean_blind.xml
            error_based.xml
            inline_query.xml
            stacked_queries.xml
            time_blind.xml
            union_query.xml
           

转载于:https://www.cnblogs.com/Primzahl/p/5971820.html

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
SQLmap是一款用来检测与利用SQL注入漏洞的免费开源工具,有一个非常棒的特性,即对检测与利用的自动化处理(数据库指纹、访问底层文件系统、执行命令)。   读者可以通过位于SourceForge的官方网站下载SQLmap源码:http://sourceforge.net/projects/sqlmap/   什么是SQL注入?         SQL注入是一种代码注入技术,过去常常用于攻击数据驱动性的应用,比如将恶意的SQL代码注入到特定字段用于实施拖库攻击等。SQL注入的成功必须借助应用程序的安全漏洞,例如用户输入没有经过正确地过滤(针对某些特定字符串)或者没有特别强调类型的时候,都容易造成异常地执行SQL语句。SQL注入是网站渗透中最常用的攻击技术,但是其实SQL注入可以用来攻击所有的SQL数据库。在这个指南中我会向你展示在Kali Linux上如何借助SQLMAP来渗透一个网站(更准确的说应该是数据库),以及提取出用户名和密码信息。   什么是SQLMAP?          SQLMAP是一个开源的渗透测试工具,它主要用于自动化地侦测和实施SQL注入攻击以及渗透数据库服务器。SQLMAP配有强大的侦测引擎,适用于高级渗透测试用户,不仅可以获得不同数据库的指纹信息,还可以从数据库中提取数据,此外还能够处理潜在的文件系统以及通过带外数据连接执行系统命令等。         访问SQLMAP的官方网站http://www.sqlmap.org可以获得SQLMAP更为详细的介绍,如它的多项特性,最为突出的是SQLMAP完美支持MySQL、Oracle、PostgreSQL、MS-SQL与Access等各种数据库的SQL侦测和注入,同时可以进行六种注入攻击。        还有很重要的一点必须说明:在你实施攻击之前想想那些网站的建立者或者维护者,他们为网站耗费了大量的时间和努力,并且很有可能以此维生。你的行为可能会以你永远都不希望的方式影响到别人。我想我已经说的够清楚了。(PS:请慎重攻击,不要做违法的事情)       PS:之前在wooyun上看了一些关于SQLMAP的文章,受益匪浅,今天翻译这篇文章,是希望对于如何使用SQLMAP提供一个基本的框架,SQL注入的原理以及SQLMAP详细的命令参数和不同的应用实例可以参考下面的文章: SQL注射原理:http://drops.wooyun.org/papers/59 SQLMAP用户手册:http://drops.wooyun.org/tips/143 SQLMAP实例COOKBOOK:http://drops.wooyun.org/tips/1343 SQLmap的作者是谁? Bernardo DameleAssumpcao Guimaraes (@inquisb),读者可以通过[email protected]与他取得联系,以及Miroslav Stampar (@stamparm)读者可以通过[email protected]与他联系。 [email protected]者联系。 相关教程请参考: http://www.cnblogs.com/waw/p/5140555.html http://www.freebuf.com/articles/web/29942.html 测试注入的效果图:       标签:sql注入
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值