https://github.com/enkomio/sacara
Sacara VM
https://github.com/enkomio/sacara
assembler assembly fsharp obfuscation programming-language vm x86
Last synced: 22 days ago
JSON representation
Sacara VM
- Host: GitHub
- URL: https://github.com/enkomio/sacara
- Owner: enkomio
- License: other
- Created: 2018-09-03T15:56:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-12-17T13:52:47.000Z (over 5 years ago)
- Last Synced: 2025-03-24T07:04:06.692Z (about 1 month ago)
- Topics: assembler, assembly, fsharp, obfuscation, programming-language, vm, x86
- Language: F#
- Size: 19.5 MB
- Stars: 122
- Watchers: 7
- Forks: 28
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Sacara - A stack based intermediate language aimed at software protection by running in a software VM
Under the _Sacara_ name belongs various projects:
* A programming language very similar to the most common intermediate representation language, like MSIL or the Java bytecode
* An assembler to transalate your _Sacara_ program in a binary format
* An interpreter based on a Virtual Machine stack based
* A .NET binding to use the unmanaged _Sacara_ DLL_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.
## Documentation
To 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.I have also published some blog posts about how to use _Sacara_ for some basic tasks.
* Writing a packer in Sacara
* Sacara VM Vs Antivirus Industry.## Release Download
- [Source code][1]
- [Download binary][2]
## Using SacaraIn order to compile a script implemented in the Sacara Intermediate Language (SIL), you have to use the Sacara assembler **SacaraAsm**.
To run a Sacara compiled script you can use the **SacaraRun** utility, or embedd the code inside your source code and using the exported APIs to run the SIL in a more controlled environment.
### Static Library
A 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.### Exported VM methods
The *SacaraVM* DLL exports various methods that can be invoked programmatically. You can find an example of usage in the Examples directory.Finally, find below an example of execution:
For more examples take a look at the Examples folder.
## .NET Binding
If you are interested in using _Sacara_ in .NET take a look at this example, which use the .NET Sacara Binding (ES.SacaraVm). 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.
## Build Sacara
_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:
* have installed .NET Core SDK
* have installed the Windows desktop development with c++. 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
* clone the repository
* run ``build.bat``## Versioning
I used [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/enkomio/sacara/tags).
## Authors
* **Antonio Parata** - *Core Developer* - [s4tan](https://twitter.com/s4tan)
## License
Sacara is licensed under the [MIT license](LICENSE.TXT).
[1]: https://github.com/enkomio/sacara/tree/master/Src
[2]: https://github.com/enkomio/sacara/releases/latest
[3]: https://github.com/enkomio/sacara/blob/master/ISA.md
[4]: https://github.com/enkomio/sacara/tree/master/Src/Examples
[5]: https://github.com/enkomio/sacara/tree/master/Src/EndToEndTests/TestSources/SelfContained
[6]: https://github.com/enkomio/sacara/tree/master/Src/EndToEndTests/TestSources/Custom
[7]: https://github.com/enkomio/sacara/blob/master/Src/Examples/SimplePacker/main.c