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

Add Netstat #330

Merged
merged 15 commits into from
Oct 29, 2023
Merged

Add Netstat #330

merged 15 commits into from
Oct 29, 2023

Conversation

jabbate19
Copy link
Collaborator

What type of PR is this?

/kind documentation
/kind feature
/kind eldritch-function

What this PR does / why we need it:

Adds netstat function to read all sockets on the system. Helps enumerate active services and possible next attack vectors.
Also refactored process.name to process.info to get all information of a process, including name.

Which issue(s) this PR fixes:

Fixes #229

@jabbate19 jabbate19 requested a review from hulto October 16, 2023 23:25
@codecov
Copy link

codecov bot commented Oct 17, 2023

Codecov Report

Merging #330 (6352836) into main (8048cff) will increase coverage by 0.18%.
The diff coverage is 86.06%.

@@            Coverage Diff             @@
##             main     #330      +/-   ##
==========================================
+ Coverage   75.19%   75.38%   +0.18%     
==========================================
  Files         101      103       +2     
  Lines        6612     6732     +120     
==========================================
+ Hits         4972     5075     +103     
- Misses       1553     1570      +17     
  Partials       87       87              
Files Coverage Δ
implants/lib/eldritch/src/lib.rs 92.75% <100.00%> (ø)
implants/lib/eldritch/src/process/info_impl.rs 97.67% <97.67%> (ø)
implants/lib/eldritch/src/process.rs 36.95% <55.55%> (+2.74%) ⬆️
implants/lib/eldritch/src/process/netstat_impl.rs 82.60% <82.60%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

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

Couple changes

docs/_docs/user-guide/eldritch.md Show resolved Hide resolved
docs/_docs/user-guide/eldritch.md Show resolved Hide resolved
implants/lib/eldritch/src/process/netstat_impl.rs Outdated Show resolved Hide resolved
implants/lib/eldritch/src/process/netstat_impl.rs Outdated Show resolved Hide resolved
@jabbate19 jabbate19 requested a review from hulto October 24, 2023 14:22
Copy link
Collaborator

@hulto hulto left a comment

Choose a reason for hiding this comment

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

Small changes and ask to leave name in. Looks good though 🙌

implants/lib/eldritch/src/lib.rs Show resolved Hide resolved
docs/_docs/user-guide/eldritch.md Outdated Show resolved Hide resolved
docs/_docs/user-guide/eldritch.md Outdated Show resolved Hide resolved
@hulto hulto merged commit 144329a into main Oct 29, 2023
8 checks passed
@hulto hulto deleted the netstat branch October 29, 2023 23:57
KCarretto pushed a commit that referenced this pull request Feb 1, 2024
 
Add Netstat (#330)

* Add Netstat

* Fix non-Linux OS

* Refactor to netstat2 and sysinfo

* Fix Windows SID Not Being a number

* Add Example for Netstat

* Return name

* Fix Name in Process

---------

Co-authored-by: Hulto <7121375+hulto@users.noreply.github.com>
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.

Implement sys netstat function in eldritch
2 participants