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

Agent Metasploit #4

Merged
merged 57 commits into from
Nov 9, 2023
Merged

Agent Metasploit #4

merged 57 commits into from
Nov 9, 2023

Conversation

BlueSquare1
Copy link
Contributor

@BlueSquare1 BlueSquare1 commented Oct 27, 2023

  • Running the following scan:
kind: AgentGroup
description: Metasploit.
agents:
  - key: agent//metasploit
    args:
      - name: config
        type: array
        value: 
          - module: 'auxiliary/scanner/portscan/tcp'
            options:
              - name: "PORTS"
                value: "80,443"

Screenshot from 2023-11-07 11-53-39

  • Results:

Screenshot from 2023-11-07 11-57-15

  • Note:

The risk rating defaults to High because we're using metasploit with CISA exploits for now.

@@ -17,7 +17,9 @@ warn_incomplete_stub = True
warn_redundant_casts = True
#warn_unreachable = True
warn_unused_ignores = True
disallow_any_unimported = True
disallow_any_unimported = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's raising errors because of pymetasploit3 local module

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How hard would it be to add typing there?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it has much value right now given the 90+ pending exploits we have.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BlueSquare1 you can ignore pymetasploit3 without ignoring everything.

Dockerfile Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/metasploit_agent.py Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/utils.py Outdated Show resolved Hide resolved
tests/conftest.py Outdated Show resolved Hide resolved
.mypy.ini Outdated Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/metasploit_agent.py Show resolved Hide resolved
agent/metasploit_agent.py Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
@BlueSquare1 BlueSquare1 changed the base branch from main to pymetasploit_only October 31, 2023 10:08
@3asm 3asm marked this pull request as draft October 31, 2023 18:36
Base automatically changed from pymetasploit_only to main October 31, 2023 18:41
@BlueSquare1 BlueSquare1 marked this pull request as ready for review November 1, 2023 09:57
Copy link
Member

@elyousfi5 elyousfi5 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use python3.11 :D

agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
agent/metasploit_agent.py Outdated Show resolved Hide resolved
tests/metasploit_agent_test.py Outdated Show resolved Hide resolved
ostorlab added 3 commits November 1, 2023 15:47
@BlueSquare1 BlueSquare1 marked this pull request as draft November 3, 2023 14:39
@BlueSquare1 BlueSquare1 marked this pull request as ready for review November 7, 2023 10:44
@3asm
Copy link
Member

3asm commented Nov 8, 2023

As discussed, add support for running multiple modules.

@3asm
Copy link
Member

3asm commented Nov 9, 2023

Please update the description.

@@ -17,7 +17,9 @@ warn_incomplete_stub = True
warn_redundant_casts = True
#warn_unreachable = True
warn_unused_ignores = True
disallow_any_unimported = True
disallow_any_unimported = False
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How hard would it be to add typing there?

ostorlab.yaml Outdated
Comment on lines 68 to 78
- key: agent//metasploit
args:
- name: module
type: string
value: 'auxiliary/scanner/portscan/tcp'
- name: options
type: array
value:
- name: "PORTS"
value: "80, 443"
```
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please correct.

requirement.txt Outdated Show resolved Hide resolved
@3asm 3asm merged commit 1b252f4 into main Nov 9, 2023
2 checks passed
@3asm 3asm deleted the agent_core branch November 9, 2023 14:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants