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

Ssh frames 5734 v3 #11415

Closed
wants to merge 3 commits into from
Closed

Conversation

catenacyber
Copy link
Contributor

Link to ticket: https://redmine.openinfosecfoundation.org/issues/
https://redmine.openinfosecfoundation.org/issues/5734

Describe changes:

  • ssh: add frames support (for clear-text records after banner)
  • detect: run frames detection on packet disabling app-layer because next packets are encrypted
  • ssh: avoid panic in packet path

SV_BRANCH=OISF/suricata-verify#1932

#11372 with better commit message and some doc added, and adds a cleanup commit

Ticket: 5734

Adds frames for SSH records, that come after banner, and before
the data is encrypted.
These records may contain cipher lists for instance.
for SSH packets that mark the end of plaintext
use debug_validate_bug_on instead
Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.45%. Comparing base (efbf627) to head (5bd9187).

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #11415      +/-   ##
==========================================
+ Coverage   82.43%   82.45%   +0.02%     
==========================================
  Files         938      938              
  Lines      248044   248098      +54     
==========================================
+ Hits       204465   204579     +114     
+ Misses      43579    43519      -60     
Flag Coverage Δ
fuzzcorpus 60.12% <98.59%> (+0.01%) ⬆️
livemode 18.84% <2.81%> (+0.12%) ⬆️
pcap 43.80% <91.54%> (+0.07%) ⬆️
suricata-verify 61.42% <92.95%> (+0.01%) ⬆️
unittests 59.45% <98.59%> (+<0.01%) ⬆️

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

@suricata-qa
Copy link

ERROR:

ERROR: QA failed on ASAN_TLPR1_suri.

Pipeline 21396

// app-layer-frame-documentation tag start: FrameType enum
#[derive(AppLayerFrameType)]
pub enum SshFrameType {
RecordHdr,
Copy link
Member

Choose a reason for hiding this comment

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

Q: No other frames seem to have this naming scheme with Record prefix. Why did you choose it?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because SSH has different stages : banner, records, and encrypted

So, the frames are about records only

Copy link
Member

Choose a reason for hiding this comment

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

oh. thank you!

@catenacyber catenacyber mentioned this pull request Jul 9, 2024
@catenacyber
Copy link
Contributor Author

Continued in #11451

@catenacyber catenacyber closed this Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants