{"id":15060294,"url":"https://github.com/enkomio/sacara","last_synced_at":"2025-04-10T05:50:27.050Z","repository":{"id":68964942,"uuid":"147226102","full_name":"enkomio/sacara","owner":"enkomio","description":"Sacara VM","archived":false,"fork":false,"pushed_at":"2019-12-17T13:52:47.000Z","size":20436,"stargazers_count":122,"open_issues_count":0,"forks_count":28,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-24T07:04:06.692Z","etag":null,"topics":["assembler","assembly","fsharp","obfuscation","programming-language","vm","x86"],"latest_commit_sha":null,"homepage":null,"language":"F#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/enkomio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2018-09-03T15:56:28.000Z","updated_at":"2024-08-12T19:41:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"385ddaec-435f-4e6d-a5cf-acb1c7bf05c9","html_url":"https://github.com/enkomio/sacara","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkomio%2Fsacara","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkomio%2Fsacara/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkomio%2Fsacara/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/enkomio%2Fsacara/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/enkomio","download_url":"https://codeload.github.com/enkomio/sacara/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248166926,"owners_count":21058480,"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":["assembler","assembly","fsharp","obfuscation","programming-language","vm","x86"],"created_at":"2024-09-24T22:56:24.586Z","updated_at":"2025-04-10T05:50:27.023Z","avatar_url":"https://github.com/enkomio.png","language":"F#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sacara - A stack based intermediate language aimed at software protection by running in a software VM\n\n \u003cp align=\"center\"\u003e\n    \u003ca href=\"https://github.com/enkomio/sacara/releases/latest\"\u003e\u003cimg alt=\"Release\" src=\"https://img.shields.io/github/release/enkomio/sacara.svg?svg=true\"\u003e\u003c/a\u003e   \n    \u003ca href=\"https://github.com/enkomio/sacara/blob/master/LICENSE.md\"\u003e\u003cimg alt=\"Software License\" src=\"https://img.shields.io/badge/License-CC%20BY%204.0-brightgreen.svg\"\u003e\u003c/a\u003e\n  \u003c/p\u003e\n\nUnder the _Sacara_ name belongs various projects:\n* A programming language very similar to the most common intermediate representation language, like MSIL or the Java bytecode\n* An assembler to transalate your _Sacara_ program in a binary format\n* An interpreter based on a Virtual Machine stack based\n* A .NET binding to use the unmanaged _Sacara_ DLL\n\n_Sacara_ was created  to learn how to create a project suited for protecting the code from being reverse enginnering. The Virtual Machine is implemented in Assembly x86 and contains some anti-analysis features. \n\n## Documentation\nTo know how to program in SacaraVM you can have a look at the [ISA][3] page, see the [Examples][4] in the source folder or read the programs ([this][5] and [this][6]) used for testing. \n\nI have also published some blog posts about how to use _Sacara_ for some basic tasks.\n\n* \u003ca href=\"http://antonioparata.blogspot.com/2019/12/writing-packer-in-sacara.html\"\u003eWriting a packer in Sacara\u003c/a\u003e\n* \u003ca href=\"http://antonioparata.blogspot.com/2018/11/sacara-vm-vs-antivirus-industry.html\"\u003eSacara VM Vs Antivirus Industry\u003c/a\u003e.\n\n## Release Download\n - [Source code][1]\n - [Download binary][2]\n \n## Using Sacara\n\nIn order to compile a script implemented in the Sacara Intermediate Language (SIL), you have to use the Sacara assembler \u003ca href=\"https://github.com/enkomio/sacara/tree/master/Src/SacaraAsm\"\u003e**SacaraAsm**\u003c/a\u003e. \n\nTo run a Sacara compiled script you can use the \u003ca href=\"https://github.com/enkomio/sacara/tree/master/Src/SacaraRun\"\u003e**SacaraRun**\u003c/a\u003e utility, or embedd the code inside your source code and using the exported APIs to run the SIL in a more controlled environment.\n\n### Static Library\nA static library (SacaraVm.lib) is available in order to avoid to bring with your program the DLL. [Here][7] an example of code using the static library.\n\n### Exported VM methods\nThe *SacaraVM* DLL exports various methods that can be invoked programmatically. You can find an \u003ca href=\"https://github.com/enkomio/sacara/blob/master/Src/Examples/InvokeNativeFunction/main.c#L42\"\u003eexample of usage in the \u003cstrong\u003eExamples\u003c/strong\u003e directory\u003c/a\u003e.\n\nFinally, find below an example of execution:\n\n\u003cimg src=\"https://raw.githubusercontent.com/enkomio/media/master/sacara/sacara_run.gif\" /\u003e\n\nFor more examples take a look at the \u003ca href=\"https://github.com/enkomio/sacara/tree/master/Src/Examples\"\u003eExamples folder\u003c/a\u003e.\n\n## .NET Binding\n\nIf you are interested in using _Sacara_ in .NET take a look at \u003ca href='https://github.com/enkomio/sacara/blob/master/Src/Examples/DotNetBinding/Program.fs'\u003ethis example\u003c/a\u003e, which use the \u003ca href='https://github.com/enkomio/sacara/tree/master/Src/ES.SacaraVm'\u003e.NET Sacara Binding (ES.SacaraVm)\u003c/a\u003e. In order to use the .NET binding the unmanaged _SacaraVm.dll_ file must be in the same directory as the _ES.SacaraVm.dll_ Assembly file.\n\n## Build Sacara\n_Sacara_ is currently developed by using VisualStudio 2017 Community Edition (be sure to have the latest version installed). To build the source code you have to:\n* have installed \u003ca href=\"https://www.microsoft.com/net/download\"\u003e.NET Core SDK\u003c/a\u003e\n* have installed the \u003ca href=\"https://blogs.msdn.microsoft.com/vcblog/2017/04/17/windows-desktop-development-with-c-in-visual-studio/\"\u003eWindows desktop development with c++\u003c/a\u003e. If you have installed Visual Studio 2017, by opening the solution (SacaraSln.sln) it should ask automatically if you want to install the missing component\n* clone the repository\n* run ``build.bat``\n\n## Versioning\n\nI used [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/enkomio/sacara/tags). \n\n## Authors\n\n* **Antonio Parata** - *Core Developer* - [s4tan](https://twitter.com/s4tan)\n\n## License\n\nSacara is licensed under the [MIT license](LICENSE.TXT).\n\n  [1]: https://github.com/enkomio/sacara/tree/master/Src\n  [2]: https://github.com/enkomio/sacara/releases/latest\n  [3]: https://github.com/enkomio/sacara/blob/master/ISA.md\n  [4]: https://github.com/enkomio/sacara/tree/master/Src/Examples\n  [5]: https://github.com/enkomio/sacara/tree/master/Src/EndToEndTests/TestSources/SelfContained\n  [6]: https://github.com/enkomio/sacara/tree/master/Src/EndToEndTests/TestSources/Custom\n  [7]: https://github.com/enkomio/sacara/blob/master/Src/Examples/SimplePacker/main.c\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenkomio%2Fsacara","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fenkomio%2Fsacara","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fenkomio%2Fsacara/lists"}