Skip to content

SessionKey handshake for V1-initial S7-1200 PLCs#761

Open
gijzelaerr wants to merge 1 commit into
masterfrom
fix-tls-layering
Open

SessionKey handshake for V1-initial S7-1200 PLCs#761
gijzelaerr wants to merge 1 commit into
masterfrom
fix-tls-layering

Conversation

@gijzelaerr

Copy link
Copy Markdown
Owner

Replaces #724 (GitHub's PR ref got stuck after force-push conflict resolution).

Summary

Adds the full session_auth package for V1-initial S7-1200 PLCs that require a SessionKey handshake before data operations:

  • s7/session_auth/: Public-key-based session authentication (Family 0 key derivation, fingerprint matching, SecurityKeyEncryptedKey blob generation, legitimation challenge solver, HMAC key derivation)
  • V3 HMAC framing for post-auth data operations
  • TIA-style CreateObject attributes (required by V1-initial firmware)
  • PAOM string stripping in ServerSessionVersion echo
  • Post-auth legitimation flow (challenge read + solved blob write)
  • Connection.connect(password=) parameter for auth flow

Test plan

Known limitations

Adds the full session_auth package (HarpoS7 port) for V1-initial S7-1200
PLCs that require a SessionKey handshake before data operations:

- s7/session_auth/: Public-key-based session authentication (Family 0
  key derivation, fingerprint matching, SecurityKeyEncryptedKey blob
  generation, legitimation challenge solver, HMAC key derivation)
- V3 HMAC framing for post-auth data operations
- TIA-style CreateObject attributes (required by V1-initial firmware)
- PAOM string stripping in ServerSessionVersion echo
- Post-auth legitimation flow (challenge read + solved blob write)
- Connection.connect(password=) parameter for auth flow

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Comment thread s7/session_auth/legitimate.py Dismissed
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.

2 participants