Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate the SMB exploiter to a plugin #2952

Closed
20 tasks done
mssalvatore opened this issue Feb 8, 2023 · 1 comment · Fixed by #3094
Closed
20 tasks done

Migrate the SMB exploiter to a plugin #2952

mssalvatore opened this issue Feb 8, 2023 · 1 comment · Fixed by #3094

Comments

@mssalvatore
Copy link
Collaborator

mssalvatore commented Feb 8, 2023

Description

Replace the hard-coded SMB exploiter with a new and improved, fully tested, SMB exploiter plugin with high code quality.

Use the HadoopExploiter as a template.

Merge PRs to 2952-smb-exploiter-plugin.

Tasks

ilija-lazoroski added a commit that referenced this issue Mar 10, 2023
ilija-lazoroski added a commit that referenced this issue Mar 10, 2023
cakekoa pushed a commit that referenced this issue Mar 13, 2023
@shreyamalviya shreyamalviya mentioned this issue Mar 13, 2023
8 tasks
@cakekoa cakekoa mentioned this issue Mar 13, 2023
7 tasks
ilija-lazoroski added a commit that referenced this issue Mar 13, 2023
@shreyamalviya
Copy link
Contributor

shreyamalviya commented Mar 14, 2023

As suspected, we can't set Kerberos auth to true with our existing code.

Relevant Agent logs with Kerberos auth set to true:
2023-03-14 07:43:33,197 [3470:ExploiterThread-01:INFO] smbexec._exploit.146: Successfully logged in to 10.2.2.14 using SMB with username, password
2023-03-14 07:43:33,197 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a ExploitationEvent event to all_events_topic
2023-03-14 07:43:33,197 [3470:ExploiterThread-01:DEBUG] agent_event_forwarder.send_event.46: Adding event of type ExploitationEvent to the queue to send to the Island
2023-03-14 07:43:33,197 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a ExploitationEvent event to ExploitationEvent-type
2023-03-14 07:43:33,197 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a ExploitationEvent event to attack-t1021-tag
2023-03-14 07:43:33,197 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a ExploitationEvent event to attack-t1110-tag
2023-03-14 07:43:33,197 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a ExploitationEvent event to smbexec-exploiter-tag
2023-03-14 07:43:33,197 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a ExploitationEvent event to attack-t1210-tag
2023-03-14 07:43:33,201 [3470:ExploiterThread-01:DEBUG] smbexec._get_rpc_connection.217: Can't connect to SCM on exploited machine {'icmp': True,
 'ip': '10.2.2.14',
 'operating_system': 'windows',
 'ports_status': {'tcp_ports': {'22': {'banner': None,
                                       'port': 22,
                                       'protocol': 'unknown',
                                       'service': 'unknown',
                                       'status': 'closed'},
                                '445': {'banner': '',
                                        'port': 445,
                                        'protocol': 'unknown',
                                        'service': 'unknown',
                                        'status': 'open'}},
                  'udp_ports': {}}}, port 139 : Cannot request session (Called Name:10.2.2.14)
2023-03-14 07:43:33,207 [3470:ExploiterThread-01:CRITICAL] ccache.loadFile.578: CCache file is not found. Skipping...
2023-03-14 07:43:33,207 [3470:ExploiterThread-01:DEBUG] ccache.loadFile.579: The specified path is not correct or the KRB5CCNAME environment variable is not defined
2023-03-14 07:43:33,208 [3470:ExploiterThread-01:DEBUG] smbexec._get_rpc_connection.217: Can't connect to SCM on exploited machine {'icmp': True,
 'ip': '10.2.2.14',
 'operating_system': 'windows',
 'ports_status': {'tcp_ports': {'22': {'banner': None,
                                       'port': 22,
                                       'protocol': 'unknown',
                                       'service': 'unknown',
                                       'status': 'closed'},
                                '445': {'banner': '',
                                        'port': 445,
                                        'protocol': 'unknown',
                                        'service': 'unknown',
                                        'status': 'open'}},
                  'udp_ports': {}}}, port 445 : Empty Domain not allowed in Kerberos
2023-03-14 07:43:33,208 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a PropagationEvent event to all_events_topic
2023-03-14 07:43:33,208 [3470:ExploiterThread-01:DEBUG] agent_event_forwarder.send_event.46: Adding event of type PropagationEvent to the queue to send to the Island
2023-03-14 07:43:33,208 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a PropagationEvent event to PropagationEvent-type
2023-03-14 07:43:33,208 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a PropagationEvent event to attack-t1569-tag
2023-03-14 07:43:33,209 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a PropagationEvent event to attack-t1021-tag
2023-03-14 07:43:33,209 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a PropagationEvent event to attack-t1105-tag
2023-03-14 07:43:33,209 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a PropagationEvent event to smbexec-exploiter-tag
2023-03-14 07:43:33,209 [3470:ExploiterThread-01:DEBUG] pypubsub_agent_event_queue._publish_event.55: Publishing a PropagationEvent event to attack-t1210-tag
2023-03-14 07:43:33,209 [3470:ExploiterThread-01:WARNING] smbexec._exploit_host.86: Failed to establish an RPC connection over SMB
2023-03-14 07:43:33,209 [3470:ExploiterThread-01:INFO] propagator._process_exploit_attempts.229: Successfully exploited (but did not propagate to) {'icmp': True,
 'ip': '10.2.2.14',
 'operating_system': 'windows',
 'ports_status': {'tcp_ports': {'22': {'banner': None,
                                       'port': 22,
                                       'protocol': 'unknown',
                                       'service': 'unknown',
                                       'status': 'closed'},
                                '445': {'banner': '',
                                        'port': 445,
                                        'protocol': 'unknown',
                                        'service': 'unknown',
                                        'status': 'open'}},
                  'udp_ports': {}}} using SMBExploiter

Removed in #3106.

cakekoa added a commit that referenced this issue Mar 23, 2023
cakekoa added a commit that referenced this issue Mar 23, 2023
cakekoa added a commit that referenced this issue Mar 23, 2023
mssalvatore added a commit that referenced this issue Mar 23, 2023
mssalvatore pushed a commit that referenced this issue Mar 23, 2023
cakekoa added a commit that referenced this issue Mar 24, 2023
cakekoa added a commit that referenced this issue Mar 24, 2023
cakekoa added a commit that referenced this issue Mar 24, 2023
mssalvatore pushed a commit that referenced this issue Mar 24, 2023
mssalvatore pushed a commit that referenced this issue Mar 24, 2023
mssalvatore added a commit that referenced this issue Mar 24, 2023
mssalvatore pushed a commit that referenced this issue Mar 24, 2023
mssalvatore pushed a commit that referenced this issue Mar 24, 2023
mssalvatore pushed a commit that referenced this issue Mar 24, 2023
@mssalvatore mssalvatore added this to the v2.1.0 milestone Mar 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants