diff --git a/Dockerfile b/Dockerfile index 9130e72..bec0c46 100644 --- a/Dockerfile +++ b/Dockerfile @@ -8,31 +8,18 @@ RUN apt-get update --fix-missing && apt install git -y # Setup work directory WORKDIR /home/mantis -# Install amass -RUN echo "Installing Amass" -RUN wget https://github.com/owasp-amass/amass/releases/download/v4.1.0/amass_Linux_amd64.zip -RUN unzip amass_Linux_amd64.zip -RUN mv amass_Linux_amd64/amass /usr/bin -RUN rm -rf * -# Install subfinder +# Install subfinder RUN echo "Installing subfinder" -RUN wget https://github.com/projectdiscovery/subfinder/releases/download/v2.6.3/subfinder_2.6.3_linux_amd64.zip -RUN unzip subfinder_2.6.3_linux_amd64.zip +RUN wget https://github.com/projectdiscovery/subfinder/releases/download/v2.6.6/subfinder_2.6.6_linux_amd64.zip +RUN unzip subfinder_2.6.6_linux_amd64.zip RUN mv subfinder /usr/bin RUN rm -rf * -# Install Puredns -RUN echo "Installing Puredns" -RUN wget https://github.com/d3mondev/puredns/releases/download/v2.1.1/puredns-Linux-amd64.tgz -RUN tar -xvf puredns-Linux-amd64.tgz -RUN mv puredns /usr/bin -RUN rm -rf * - # Install HTTPX RUN echo "Installing HTTPX" -RUN wget https://github.com/projectdiscovery/httpx/releases/download/v1.3.7/httpx_1.3.7_linux_amd64.zip -RUN unzip httpx_1.3.7_linux_amd64.zip +RUN wget https://github.com/projectdiscovery/httpx/releases/download/v1.6.8/httpx_1.6.8_linux_amd64.zip +RUN unzip httpx_1.6.8_linux_amd64.zip RUN mv httpx /usr/bin RUN rm -rf * @@ -42,9 +29,9 @@ RUN pip install git+https://github.com/cisagov/findcdn.git # Install Ipinfo RUN echo "Installing Ipinfo" -RUN wget https://github.com/ipinfo/cli/releases/download/ipinfo-3.1.2/ipinfo_3.1.2_linux_amd64.tar.gz -RUN tar -xvf ipinfo_3.1.2_linux_amd64.tar.gz -RUN mv ipinfo_3.1.2_linux_amd64 ipinfo +RUN wget https://github.com/ipinfo/cli/releases/download/ipinfo-3.3.1/ipinfo_3.3.1_linux_amd64.tar.gz +RUN tar -xvf ipinfo_3.3.1_linux_amd64.tar.gz +RUN mv ipinfo_3.3.1_linux_amd64 ipinfo RUN mv ipinfo /usr/bin RUN rm -rf * @@ -57,8 +44,8 @@ RUN rm -rf * # Install nuclei RUN echo "Installing nuclei" -RUN wget https://github.com/projectdiscovery/nuclei/releases/download/v3.0.4/nuclei_3.0.4_linux_amd64.zip -RUN unzip nuclei_3.0.4_linux_amd64.zip +RUN wget https://github.com/projectdiscovery/nuclei/releases/download/v3.3.4/nuclei_3.3.4_linux_amd64.zip +RUN unzip nuclei_3.3.4_linux_amd64.zip RUN mv nuclei /usr/bin RUN rm -rf * diff --git a/configs/local.yml b/configs/local.yml index d9f2c00..4bb05be 100644 --- a/configs/local.yml +++ b/configs/local.yml @@ -6,7 +6,7 @@ workflow: cmd: [] workflowConfig: - moduleName : discovery - tools: ['Subfinder', 'Amass'] + tools: ['Subfinder'] order: 1 - moduleName: prerecon tools: ['FindCDN', 'Naabu'] @@ -34,7 +34,7 @@ workflow: tools: ['Route53', 'Cloudflare'] order: 1 - moduleName : discovery - tools: ['Subfinder', 'SSLMate', 'Amass'] + tools: ['Subfinder', 'SSLMate'] order: 1 - moduleName: prerecon tools: ['FindCDN', 'Naabu', 'IPinfo'] @@ -58,7 +58,7 @@ workflow: cmd: [] workflowConfig: - moduleName : discovery - tools: ['Subfinder', 'Amass'] + tools: ['Subfinder'] order: 1 - moduleName: prerecon tools: ['FindCDN', 'Naabu'] diff --git a/mantis/modules/discovery/Amass.py b/mantis/modules/discovery/Amass.py deleted file mode 100644 index 10a427c..0000000 --- a/mantis/modules/discovery/Amass.py +++ /dev/null @@ -1,41 +0,0 @@ - -from mantis.models.args_model import ArgsModel -from mantis.utils.tool_utils import get_assets_grouped_by_type -from mantis.tool_base_classes.toolScanner import ToolScanner -from mantis.constants import ASSET_TYPE_SUBDOMAIN -from mantis.utils.crud_utils import CrudUtils -from mantis.constants import ASSET_TYPE_TLD - -''' -The Amass module enumerates subdomain of the TLDs which are fetched from database. -Output file: .txt separated by new line. -Each subdomain discovered is inserted into the database as a new asset. -''' - -class Amass(ToolScanner): - - def __init__(self) -> None: - super().__init__() - - async def get_commands(self, args: ArgsModel): - self.org = args.org - self.base_command = 'amass enum -passive -d {input_domain} -o {output_file_path}' - self.outfile_extension = ".txt" - self.assets = await get_assets_grouped_by_type(self, args, ASSET_TYPE_TLD) - return super().base_get_commands(self.assets) - - def parse_report(self, outfile): - output_dict_list = [] - amass_output = open(outfile).readlines() - for domain in amass_output: - domain_dict = {} - domain_dict['_id'] = domain.rstrip('\n') - domain_dict['asset'] = domain.rstrip('\n') - domain_dict['asset_type'] = ASSET_TYPE_SUBDOMAIN - domain_dict['org'] = self.org - output_dict_list.append(domain_dict) - - return output_dict_list - - async def db_operations(self, tool_output_dict, asset=None): - await CrudUtils.insert_assets(tool_output_dict) diff --git a/requirements.txt b/requirements.txt index 0304023..1c28c32 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,8 +1,8 @@ decorator==5.1.1 -motor==3.0.0 +motor==3.6.0 netaddr==0.8.0 -pydantic==1.10.2 -pymongo==4.2.0 +pydantic==1.10.13 +pymongo==4.9.1 PyYAML==6.0 typing_extensions==4.4.0 validators==0.20.0 @@ -13,5 +13,5 @@ retry==0.9.2 slack-sdk==3.21.3 rocketry==2.5.1 boto3==1.28.20 -tqdm==4.66.1 -cloudflare \ No newline at end of file +tqdm==4.66.5 +cloudflare