Skip to content

Conversation

bogdanvbalan
Copy link
Contributor

Summary

Add hooks into stripped binaries for SSL calls

Changes

  • import the offset db
  • add the offset into the image so that it can be accessible
  • add the logic to check if the binaries hash is in db and hook to it

type SslHooks struct {
links []link.Link
}

// TODO: incapsulate, add devuce id to the key, delete on file is deleted
var hookInodes, _ = lru.New[uint64, uint32](16384)

func init() {
if err := offStore.LoadOffsets(offsetdb); err != nil {
panic(err)
Copy link
Collaborator

Choose a reason for hiding this comment

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

panic doesn't look good,
tracer should be able to work without offsetdb
In case if db is not loaded it should skip all the new code in the workflow

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Removed the panic and moved it into an once call

type SslHooks struct {
links []link.Link
}

// TODO: incapsulate, add devuce id to the key, delete on file is deleted
var hookInodes, _ = lru.New[uint64, uint32](16384)

func init() {
if err := offStore.LoadOffsets(offsetdb); err != nil {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This must be duplication of onceFunc part - to be removed

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