{"action":"created","issue":{"url":"https://api.github.com/repos/wpscanteam/wpscan/issues/948","repository_url":"https://api.github.com/repos/wpscanteam/wpscan","labels_url":"https://api.github.com/repos/wpscanteam/wpscan/issues/948/labels{/name}","comments_url":"https://api.github.com/repos/wpscanteam/wpscan/issues/948/comments","events_url":"https://api.github.com/repos/wpscanteam/wpscan/issues/948/events","html_url":"https://github.com/wpscanteam/wpscan/issues/948","id":157524878,"number":948,"title":"wrong version detected because methods called in WpVersion.find returns a bad order","user":{"login":"tmendo","id":1278447,"avatar_url":"https://avatars.githubusercontent.com/u/1278447?v=3","gravatar_id":"","url":"https://api.github.com/users/tmendo","html_url":"https://github.com/tmendo","followers_url":"https://api.github.com/users/tmendo/followers","following_url":"https://api.github.com/users/tmendo/following{/other_user}","gists_url":"https://api.github.com/users/tmendo/gists{/gist_id}","starred_url":"https://api.github.com/users/tmendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmendo/subscriptions","organizations_url":"https://api.github.com/users/tmendo/orgs","repos_url":"https://api.github.com/users/tmendo/repos","events_url":"https://api.github.com/users/tmendo/events{/privacy}","received_events_url":"https://api.github.com/users/tmendo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2016-05-30T15:41:40Z","updated_at":"2016-06-01T10:29:58Z","closed_at":null,"body":"wpscan returns the wrong version because the methods function called in WpVersion.find returns the methods with a wrong order, depending on the ruby version you run.\r\n\r\nI have wordpress 4.1.11 installed, which is easily detected through the meta generator, using wpscan 2.9.1, with an updated DB, using ruby 2.1.9p490 (2016-03-30 revision 54437) [x86_64-darwin15], installed from macports.\r\nWith this setup, methods returns the following list (truncated):\r\n\r\n```\r\nall\r\nfind\r\nversion_pattern\r\nscan_url\r\nfind_from_meta_generator\r\nfind_from_rss_generator\r\nfind_from_rdf_generator\r\nfind_from_atom_generator\r\nfind_from_advanced_fingerprinting\r\nfind_from_readme\r\nfind_from_sitemap_generator\r\nfind_from_links_opml\r\nfind_from_stylesheets_numbers\r\nyaml_tag\r\n```\r\n\r\nHowever, using ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15], wpscan identifies the wrong version, name \"[+] WordPress version 4.2 identified from advanced fingerprinting (Released on 2015-04-23)\".\r\nThis happens because methods returns the function list in a different order, namely (truncated):\r\n\r\n```\r\nall\r\nfind\r\nfind_from_advanced_fingerprinting\r\nversion_pattern\r\nscan_url\r\nfind_from_meta_generator\r\nfind_from_rss_generator\r\nfind_from_rdf_generator\r\nfind_from_atom_generator\r\nfind_from_readme\r\nfind_from_sitemap_generator\r\nfind_from_links_opml\r\nfind_from_stylesheets_numbers\r\nyaml_tag\r\n```\r\n\r\nThe problem clearly seems to be the dependence on the ordering of the methods call, which depends on the version. I think the order should be hard coded instead of relying on the ruby version.\r\n\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/wpscanteam/wpscan/issues/comments/222954236","html_url":"https://github.com/wpscanteam/wpscan/issues/948#issuecomment-222954236","issue_url":"https://api.github.com/repos/wpscanteam/wpscan/issues/948","id":222954236,"user":{"login":"tmendo","id":1278447,"avatar_url":"https://avatars.githubusercontent.com/u/1278447?v=3","gravatar_id":"","url":"https://api.github.com/users/tmendo","html_url":"https://github.com/tmendo","followers_url":"https://api.github.com/users/tmendo/followers","following_url":"https://api.github.com/users/tmendo/following{/other_user}","gists_url":"https://api.github.com/users/tmendo/gists{/gist_id}","starred_url":"https://api.github.com/users/tmendo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmendo/subscriptions","organizations_url":"https://api.github.com/users/tmendo/orgs","repos_url":"https://api.github.com/users/tmendo/repos","events_url":"https://api.github.com/users/tmendo/events{/privacy}","received_events_url":"https://api.github.com/users/tmendo/received_events","type":"User","site_admin":false},"created_at":"2016-06-01T10:29:58Z","updated_at":"2016-06-01T10:29:58Z","body":"@FireFart works fine with both ruby version:\r\n[+] WordPress version 4.1.11 identified from meta generator, readme, links opml\r\n\r\nWorks fine also against a 4.2 ([+] WordPress version 4.2 (Released on 2015-04-23) identified from meta generator, advanced fingerprinting, readme, links opml)"}}
{"actor":{"display_login":"tmendo"}}