{"id":15655383,"url":"https://github.com/nlevitt/exec_spy","last_synced_at":"2025-03-30T01:41:13.527Z","repository":{"id":138585280,"uuid":"120969158","full_name":"nlevitt/exec_spy","owner":"nlevitt","description":"My Toy Kernel Module Just For Fun","archived":false,"fork":false,"pushed_at":"2018-02-22T01:03:21.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-05T03:56:34.803Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nlevitt.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-10T00:06:55.000Z","updated_at":"2018-02-10T00:09:48.000Z","dependencies_parsed_at":"2023-04-15T12:01:32.958Z","dependency_job_id":null,"html_url":"https://github.com/nlevitt/exec_spy","commit_stats":{"total_commits":12,"total_committers":1,"mean_commits":12.0,"dds":0.0,"last_synced_commit":"ae36fb544c9585662418e7120dbd29cbca96eb80"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlevitt%2Fexec_spy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlevitt%2Fexec_spy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlevitt%2Fexec_spy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nlevitt%2Fexec_spy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nlevitt","download_url":"https://codeload.github.com/nlevitt/exec_spy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246266252,"owners_count":20749754,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T12:58:41.196Z","updated_at":"2025-03-30T01:41:13.509Z","avatar_url":"https://github.com/nlevitt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"My Toy Kernel Module Just For Fun\n---------------------------------\n\n`exec_spy.c` is a linux kernel module which intercepts and wraps the execve(2)\nsyscall and logs the command being run (or attempted), arguments, and a few\nother pieces of information (pid, uid, cwd).\n\nIt accomplishes this by messing with the syscall table in a way that might be\narchitecture (x86_64) and kernel version specific. Developed on Ubuntu 17.10\n\"artful\" and kernel 4.13.0-32-generic. Might have bugs and crash your computer,\nso don't run it anywhere that matters. For example, my vm froze when I tried\nloading it on 4.4.0-45-generic.\n\nTo build, make sure `/lib/modules/$(uname -r)/build` is set up correctly for\nbuilding kernel modules. On Ubuntu I think all you have to do is `apt-get\ninstall linux-headers`. Then run `make`. For more information see\nhttps://www.kernel.org/doc/Documentation/kbuild/modules.txt\n\nLoad with `insmod exec_spy.ko`, unload with `rmmod exec_spy`.\n\nNote: *The kernel already has this functionality (and much more) built into\nit.* Try this on Ubuntu:\n\n```shell\nsudo apt-get -y install auditd\nsudo auditctl -a exit,always -F arch=b64 -S execve\nsudo auditctl -a exit,always -F arch=b32 -S execve\nsudo auditctl -a exit,always -F arch=b64 -S execveat\nsudo auditctl -a exit,always -F arch=b32 -S execveat\nsudo less +F /var/log/audit/audit.log\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlevitt%2Fexec_spy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnlevitt%2Fexec_spy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnlevitt%2Fexec_spy/lists"}