Nytro Posted August 1, 2013 Report Posted August 1, 2013 [h=3]Recon-ng Framework A Quick Intro [/h]Recon-ng is an open-source framework coded in python by Tim Tomes a.k.a LaNMaSteR53. Its interface is modeled after the look of the Metasploit Framework but it is not meant for exploitation or for spawning a meterpreter session or a shell, it is for web-based reconnaissance and information gathering. It comes with modules to support your web reconnaissance adventure and information gathering just like Metasploit's auxiliary and exploit modules. Modules are categorized into Discovery, Experimental, Recon and Reporting.As of this writing here are the modules with its subcategories: Discovery---------discovery/exploitable/http/dnn_fcklinkgallerydiscovery/exploitable/http/generic_restaurantmenudiscovery/exploitable/http/webwiz_rtediscovery/info_disclosure/dns/cache_snoopdiscovery/info_disclosure/http/backup_finderdiscovery/info_disclosure/http/google_idsdiscovery/info_disclosure/http/interesting_files Experimental------------experimental/rceRecon-----recon/contacts/enum/http/web/dev_diverrecon/contacts/enum/http/web/namechkrecon/contacts/enum/http/web/pwnedlistrecon/contacts/enum/http/web/should_change_passwordrecon/contacts/gather/http/api/jigsaw/point_usagerecon/contacts/gather/http/api/jigsaw/purchase_contactrecon/contacts/gather/http/api/jigsaw/search_contactsrecon/contacts/gather/http/api/linkedin_authrecon/contacts/gather/http/api/twitterrecon/contacts/gather/http/api/whois_pocsrecon/contacts/gather/http/web/jigsawrecon/contacts/gather/http/web/pgp_searchrecon/contacts/support/add_contactrecon/contacts/support/manglerecon/creds/enum/http/api/leakdbrecon/creds/enum/http/api/noisetterecon/creds/gather/http/api/pwnedlist/account_credsrecon/creds/gather/http/api/pwnedlist/api_usagerecon/creds/gather/http/api/pwnedlist/domain_credsrecon/creds/gather/http/api/pwnedlist/domain_ispwnedrecon/creds/gather/http/api/pwnedlist/leak_lookuprecon/creds/gather/http/api/pwnedlist/leaks_dumprecon/hosts/enum/dns/resolverecon/hosts/enum/http/api/builtwithrecon/hosts/enum/http/api/punkspiderrecon/hosts/enum/http/api/wascompanyhackedrecon/hosts/enum/http/api/whatwebrecon/hosts/enum/http/api/whois_lookuprecon/hosts/enum/http/web/age_analyzerrecon/hosts/enum/http/web/asafawebrecon/hosts/enum/http/web/gender_analyzerrecon/hosts/enum/http/web/ipvoidrecon/hosts/enum/http/web/malwaredomainrecon/hosts/enum/http/web/mywotrecon/hosts/enum/http/web/netbiosrecon/hosts/enum/http/web/netcraft_historyrecon/hosts/enum/http/web/open_resolversrecon/hosts/enum/http/web/urlvoidrecon/hosts/enum/http/web/web_archiverecon/hosts/enum/http/web/xssedrecon/hosts/gather/dns/brute_forcerecon/hosts/gather/http/api/bing_iprecon/hosts/gather/http/api/google_siterecon/hosts/gather/http/api/shodan_hostnamerecon/hosts/gather/http/web/baidu_siterecon/hosts/gather/http/web/bing_siterecon/hosts/gather/http/web/census_2012recon/hosts/gather/http/web/google_siterecon/hosts/gather/http/web/ip_neighborrecon/hosts/gather/http/web/mcafee/mcafee_affilrecon/hosts/gather/http/web/mcafee/mcafee_dnsrecon/hosts/gather/http/web/mcafee/mcafee_mailrecon/hosts/gather/http/web/netcraftrecon/hosts/gather/http/web/yahoo_siterecon/hosts/geo/http/api/hostiprecon/hosts/geo/http/api/ipinfodbrecon/hosts/geo/http/api/maxmindrecon/hosts/geo/http/api/uniapplerecon/hosts/geo/http/web/wiglerecon/hosts/support/add_hostReporting---------reporting/csv_filereporting/html_reportreporting/list I am also one of the contributors for this framework and has contributed mostly to the Discovery modules. In this article I'm going to emphasize the Backup File Finder module which I authored together with Tim Tomes (the main developer of Recon-ng). This module can be used for checking specific hosts for exposed backup files. The default configuration searches for wp-config.php files which contain WordPress database configuration information.As a side note, this module is inspired by cmsploit.Basic Usage: load discovery/info_disclosure/http/backup_finder (use the module)show options (shows the options that can be set for the module)set source target.com (the host you want to crawl)set uri config_file (configuration file you want to check, ex. wp-config.php)Here is the screenshot of the Backup File Finder's actual crawling. Now, here is what's inside in a typical configuration file:define('DB_NAME', 'wordpress'); /** MySQL database username */define('DB_USER', 'root'); /** MySQL database password */define('DB_PASSWORD', 'passwd'); /** MySQL hostname */define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */define('DB_CHARSET', 'utf8'); /** The Database Collate type. Don't change this if in doubt. */define('DB_COLLATE', ''); List of the various configuration files used by popular CMS' which can be set to the option uri:wp-config.php >> WordPressconfig.php >> phpBB, ExpressionEngineconfiguration.php >> JoomlaLocalSettings.php >>MediaWikimt-config.cgi >> Movable Typesettings.php >> Drupal About The Author This article has been written by Jay Turla, he is a security researcher at Infosec, along with security research he also performs vulnerability research too.Resources:https://bitbucket.org/LaNMaSteR53/recon-ngThe Recon-ng Framework : Automated Information Gathering1% of CMS-Powered Sites Expose Their Database Passwords Quote