{"action":"created","issue":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5968","labels_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5968/labels{/name}","comments_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5968/comments","events_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5968/events","html_url":"https://github.com/rapid7/metasploit-framework/issues/5968","id":105976638,"number":5968,"title":"enum_laps -- Rex::Post::Meterpreter::RequestError extapi_adsi_domain_query: Operation failed","user":{"login":"all3g","id":7352479,"avatar_url":"https://avatars.githubusercontent.com/u/7352479?v=3","gravatar_id":"","url":"https://api.github.com/users/all3g","html_url":"https://github.com/all3g","followers_url":"https://api.github.com/users/all3g/followers","following_url":"https://api.github.com/users/all3g/following{/other_user}","gists_url":"https://api.github.com/users/all3g/gists{/gist_id}","starred_url":"https://api.github.com/users/all3g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/all3g/subscriptions","organizations_url":"https://api.github.com/users/all3g/orgs","repos_url":"https://api.github.com/users/all3g/repos","events_url":"https://api.github.com/users/all3g/events{/privacy}","received_events_url":"https://api.github.com/users/all3g/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/meterpreter","name":"meterpreter","color":"5319e7"},{"url":"https://api.github.com/repos/rapid7/metasploit-framework/labels/module","name":"module","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"jvazquez-r7","id":1742838,"avatar_url":"https://avatars.githubusercontent.com/u/1742838?v=3","gravatar_id":"","url":"https://api.github.com/users/jvazquez-r7","html_url":"https://github.com/jvazquez-r7","followers_url":"https://api.github.com/users/jvazquez-r7/followers","following_url":"https://api.github.com/users/jvazquez-r7/following{/other_user}","gists_url":"https://api.github.com/users/jvazquez-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/jvazquez-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvazquez-r7/subscriptions","organizations_url":"https://api.github.com/users/jvazquez-r7/orgs","repos_url":"https://api.github.com/users/jvazquez-r7/repos","events_url":"https://api.github.com/users/jvazquez-r7/events{/privacy}","received_events_url":"https://api.github.com/users/jvazquez-r7/received_events","type":"User","site_admin":false},"milestone":null,"comments":7,"created_at":"2015-09-11T09:35:33Z","updated_at":"2015-09-21T19:41:11Z","closed_at":null,"body":"```\r\nmsf post(enum_laps) > sessions -l\r\n\r\nActive sessions\r\n===============\r\n\r\n  Id  Type                   Information                            Connection\r\n  --  ----                   -----------                            ----------\r\n  5   meterpreter x86/win32  NT AUTHORITY\\SYSTEM @ WIN-XUMIF9WPKIP  192.168.10.108:4444 -> 192.168.10.32:53155 (192.168.10.32)\r\n  6   meterpreter x64/win64  NT AUTHORITY\\SYSTEM @ WIN-XUMIF9WPKIP  192.168.10.108:4444 -> 192.168.10.32:53156 (192.168.10.32)\r\n  7   meterpreter x86/win32  PENTEST\\debug @ CORELAN-LAB            192.168.10.108:4444 -> 192.168.10.39:2342 (192.168.10.39)\r\nmsf post(enum_laps) > sessions -i 7\r\n[*] Starting interaction with 7...\r\n\r\nmeterpreter > sysinfo \r\nComputer        : CORELAN-LAB\r\nOS              : Windows XP (Build 2600, Service Pack 3).\r\nArchitecture    : x86\r\nSystem Language : zh_CN\r\nDomain          : PENTEST\r\nLogged On Users : 3\r\nMeterpreter     : x86/win32\r\n```\r\n\r\n```\r\nmsf post(enum_laps) > show options \r\n\r\nModule options (post/windows/gather/credentials/enum_laps):\r\n\r\n   Name              Current Setting                                Required  Description\r\n   ----              ---------------                                --------  -----------\r\n   DOMAIN            PENTEST.COM                                    no        The domain to query or distinguished name (e.g. DC=test,DC=com)\r\n   FILTER            (&(objectCategory=Computer)(ms-MCS-AdmPwd=*))  yes       Search filter.\r\n   LOCAL_ADMIN_NAME  Administrator                                  yes       The username to store the password against\r\n   MAX_SEARCH        500                                            yes       Maximum values to retrieve, 0 for all.\r\n   SESSION           7                                              yes       The session to run this module on.\r\n   STORE_DB          false                                          yes       Store file in loot.\r\n   STORE_LOOT        true                                           yes       Store file in loot.\r\n\r\nmsf post(enum_laps) > run\r\n\r\n[-] Post failed: Rex::Post::Meterpreter::RequestError extapi_adsi_domain_query: Operation failed: 2147950651\r\n[-] Call stack:\r\n[-]   /opt/metasploit-framework/lib/rex/post/meterpreter/extensions/extapi/adsi/adsi.rb:49:in `domain_query'\r\n[-]   /opt/metasploit-framework/lib/msf/core/post/windows/ldap.rb:126:in `query'\r\n[-]   /opt/metasploit-framework/modules/post/windows/gather/credentials/enum_laps.rb:53:in `run'\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/comments/142088041","html_url":"https://github.com/rapid7/metasploit-framework/issues/5968#issuecomment-142088041","issue_url":"https://api.github.com/repos/rapid7/metasploit-framework/issues/5968","id":142088041,"user":{"login":"jvazquez-r7","id":1742838,"avatar_url":"https://avatars.githubusercontent.com/u/1742838?v=3","gravatar_id":"","url":"https://api.github.com/users/jvazquez-r7","html_url":"https://github.com/jvazquez-r7","followers_url":"https://api.github.com/users/jvazquez-r7/followers","following_url":"https://api.github.com/users/jvazquez-r7/following{/other_user}","gists_url":"https://api.github.com/users/jvazquez-r7/gists{/gist_id}","starred_url":"https://api.github.com/users/jvazquez-r7/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jvazquez-r7/subscriptions","organizations_url":"https://api.github.com/users/jvazquez-r7/orgs","repos_url":"https://api.github.com/users/jvazquez-r7/repos","events_url":"https://api.github.com/users/jvazquez-r7/events{/privacy}","received_events_url":"https://api.github.com/users/jvazquez-r7/received_events","type":"User","site_admin":false},"created_at":"2015-09-21T19:41:11Z","updated_at":"2015-09-21T19:41:11Z","body":"That said, normally modules using the `LDAP` mixin are handling `::Rex::Post::Meterpreter::RequestError` when calling `query`. But three modules are forgetting to do it: enum_laps, enum_ad_bitlocker and enum_ad_computers.\r\n\r\nThe PR #5993 fix these three modules to handle exceptions, so only an error shows up, instead of an unhandled exception. "}}