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

Added an event for default rule "Detect outbound connections to common miner pool ports" #176

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

GLVSKiriti
Copy link
Contributor

What type of PR is this?

Uncomment one (or more) /kind <> lines:

/kind bug

/kind cleanup

/kind documentation

/kind tests

/kind feature

Any specific area of the project related to this PR?

Uncomment one (or more) /area <> lines:

/area commands

/area pkg

/area events

What this PR does / why we need it:
Added an event for default rule "Detect outbound connections to common miner pool ports"

Which issue(s) this PR fixes:

Fixes #174

Special notes for your reviewer:

…rPoolPorts

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
@poiana
Copy link

poiana commented Mar 20, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: GLVSKiriti
Once this PR has been reviewed and has the lgtm label, please assign leogr for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@GLVSKiriti
Copy link
Contributor Author

As this rule is disabled by default so I enabled it at here. And on executing event code it is producing critical priority log as expected in left terminal. And now test is also successful!

DetectOutboundConnectionsTocommonMinerPoolPOrts

Signed-off-by: GLVS Kiriti <glvskiriti2003369@gmail.com>
@GLVSKiriti
Copy link
Contributor Author

@FedeDP Just executing curl command is enough to trigger this rule

h.Log().Warnf("Curl is needed to launch this action")
return err
}
cmd := exec.Command(curl, "http://mine.moneropool.com")
Copy link
Contributor

Choose a reason for hiding this comment

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

Mmh is GETting this link safe?

Copy link
Contributor Author

@GLVSKiriti GLVSKiriti Apr 3, 2024

Choose a reason for hiding this comment

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

Dont have an idea about that . I executed in my system 🙃

Copy link
Contributor

Choose a reason for hiding this comment

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

cc @leogr

Copy link
Member

Choose a reason for hiding this comment

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

Regardless if it's safe or not, this approach will make the action unpredictable (that worries me more).

Are there any alternative approaches that do not involve talking with external servers? 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@FedeDP @leogr if we are worrying about this

Mmh is GETting this link safe?

then why cant we follow this approach i.e, let us add any example domain in the rule here, which can be used for testing purposes. So after that we can curl example.com which triggers the rule and safe to GET the request. WDYT? about this approach. IMO instead of curling the suspicious domains we can do this which will be beneficial for testing purposes

- list: http_miner_domains
  items: [
    "ca.minexmr.com",
    "de.minexmr.com",
    "fr.minexmr.com",
    "mine.moneropool.com",
    "mine.xmrpool.net",
    "pool.minexmr.com",
    "sg.minexmr.com",
    "xmr.crypto-pool.fr",
    "example.com" # Not a miner domain but used for testing purposes in falco
  ]

@GLVSKiriti GLVSKiriti requested a review from FedeDP April 9, 2024 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add an event for default rule "Detect outbound connections to common miner pool ports"
4 participants