Giter VIP home page Giter VIP logo

Comments (8)

pedramamini avatar pedramamini commented on July 29, 2024

For DNS: https://majestic.com/reports/majestic-million

from threatkb.

pedramamini avatar pedramamini commented on July 29, 2024

@dcuellar322 what will the API interaction look like for this when we're posting a new C2 IP or C2 DNS artifact and it matches something on the whitelist. Drop it silently? Return an error?

from threatkb.

pedramamini avatar pedramamini commented on July 29, 2024

@dcuellar322 ideally if we post a list of artifacts, we'll get a response back for the ones that were rejected with some reason (duplicate, whitelisted, etc.)

from threatkb.

danny248 avatar danny248 commented on July 29, 2024

@pedramamini @dcuellar322

If you're talking about mass import then it would be a function of the import api. The current output of the import api is below. we will just add a "whitelisted" key to the artifacts dictionary and pass back the information that way.

{
"artifacts": {
"duplicates": [
{
"type": "IP",
"artifact": "1.1.1.1"
}
],
"committed": [
{
"addedTags": [],
"tags": [],
"ip": "200.0.2.2",
"created_user": {
"active": true,
"admin": true,
"registered_on": "2017-08-23T00:27:31",
"email": "[email protected]",
"id": 3
},
"owner_user": null,
"reference_link": null,
"id": 49,
"asn": "CLARO S.A., BR",
"expiration_timestamp": null,
"city": null,
"date_modified": "2017-09-14T18:11:11",
"reference_text": null,
"modified_user": {
"active": true,
"admin": true,
"registered_on": "2017-08-23T00:27:31",
"email": "[email protected]",
"id": 3
},
"comments": [],
"st": null,
"state": "Imported",
"removedTags": [],
"country": null,
"date_created": "2017-09-14T18:11:11",
"expiration_type": null
}
]
}
}

from threatkb.

danny248 avatar danny248 commented on July 29, 2024

@pedramamini how big is this list going to get? Trying to decide if we should store it in a flat file or the database.

from threatkb.

pedramamini avatar pedramamini commented on July 29, 2024

from threatkb.

danny248 avatar danny248 commented on July 29, 2024

@dcuellar322

We need a table to track whitelist items. It will need CRUD operations and fields:
created_time
modified_time
created_by_user
modified_by_user
whitelist_artifact
notes

Whitelist artifacts can be:
network CIDR (EX: 100.12.12.0/24)
a single IP
regex

Add a before-insert listener for c2dns and c2ip (See: app.models.yara_rules line 171 for example):
in the before-insert listener, iterate through the whitelist and do the following:
if the whitelist artifact is a network cidr, test to see whether the IP is in the CIDR
if the whitelist artifact is a single IP, test for an exact match
if the whitelist artifact is a regex, test it against the ip or dns entry

If there is a match, bail on the insert

from threatkb.

dcuellar322 avatar dcuellar322 commented on July 29, 2024

whitelist_artifact (2048)
notes (2048)

https://netaddr.readthedocs.io/en/latest/tutorial_01.html
try to instantiate IPAddress and IPNetwork
if they fail then it is a regex

from threatkb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.