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 SSHD Contribution and more unix files for parsing #422

Merged
merged 22 commits into from
Oct 26, 2023

Conversation

Miauwkeru
Copy link
Contributor

  • Add basic scope change for indentation
  • Add scoping functionality depending on indentation
  • Make names a bit more consistent
  • Reduce code duplication in arguments
  • Add a collapse_inverse option, to invert the keys inside collapse
  • Extract common sshd_directory information
  • Add sshd_config parser contribution

(DIS-2240)

@Miauwkeru
Copy link
Contributor Author

This pr includes the contribution inside #322, with some additional changes



class SSHServerPlugin(Plugin):
__namespace__ = "sshd"
Copy link
Member

Choose a reason for hiding this comment

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

Would it make sense to put the public/private keys/etc functions of the ssh plugin for the server directory in this plugin? @JSCU-CNI?

As also mentioned in another PR, that would probably mean moving the current ssh plugin to openssh and creating a namespaced ssh plugin that would wrap openssh, putty, and probably dropbear down the line.

Copy link
Contributor

Choose a reason for hiding this comment

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

As discussed, this approach would make sense in our opinion.

@Miauwkeru Miauwkeru marked this pull request as ready for review October 23, 2023 07:55
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #422 (bdf7f9f) into main (42bac01) will increase coverage by 0.17%.
The diff coverage is 95.21%.

@@            Coverage Diff             @@
##             main     #422      +/-   ##
==========================================
+ Coverage   74.09%   74.26%   +0.17%     
==========================================
  Files         255      256       +1     
  Lines       20318    20460     +142     
==========================================
+ Hits        15054    15195     +141     
- Misses       5264     5265       +1     
Flag Coverage Δ
unittests 74.26% <95.21%> (+0.17%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
dissect/target/filesystems/config.py 87.62% <100.00%> (ø)
dissect/target/plugins/apps/ssh/openssh.py 94.17% <100.00%> (+0.17%) ⬆️
dissect/target/plugins/general/config.py 97.14% <100.00%> (+2.85%) ⬆️
dissect/target/plugins/apps/ssh/opensshd.py 93.54% <93.54%> (ø)
dissect/target/helpers/configutil.py 93.95% <95.31%> (ø)

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

@Miauwkeru Miauwkeru force-pushed the DIS-2466_add-ssh-contrib-and-unix-files branch from 1432ec4 to d159768 Compare October 26, 2023 11:10
@Miauwkeru Miauwkeru requested a review from pyrco October 26, 2023 11:11
@Miauwkeru Miauwkeru dismissed Schamper’s stale review October 26, 2023 11:20

Fixed everything besides the question to @JSCU-CNI

@Miauwkeru Miauwkeru merged commit f6cb430 into main Oct 26, 2023
@Miauwkeru Miauwkeru deleted the DIS-2466_add-ssh-contrib-and-unix-files branch October 26, 2023 11:32
Schamper pushed a commit that referenced this pull request Oct 27, 2023
@JSCU-CNI JSCU-CNI mentioned this pull request Nov 1, 2023
Poeloe pushed a commit that referenced this pull request Feb 29, 2024
Zawadidone pushed a commit to Zawadidone/dissect.target that referenced this pull request Apr 5, 2024
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.

5 participants