Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
github.com/vulogov/threadcomputation
ThreadComputation is a programmatic module implementing core interpreter and virtual machine for programming language BUND. Being a GoLang module, ThreadComputation can be embedded in your project, giving you ability to add Domain Specific Language to your application.
BUND language is interpreted, dynamically typed, functional and stack-based language, implemented in Go, embeddable a extendable with GoLang. BUND build around two-dimentional stack engine acting like a storage for the functions call modeled with idea of threading macros in mind. What is the main features of the BUND:
The famous HelloWorld program will look like this:
print['Hello World!']
In this example, we are calling function print and pass the string as a function argument. Alternatively, you can execute that code:
'Hello world!' print
And in this example, you do not pass the string as argument and function print will take data from the stack. Or you can do something like that:
+['Hello ' 'world!'] `print attr !
Here, first, you are creating string using concatenation, then create function reference, then dynamically assign arguments to the that reference than execute that reference. As you see, possibilitis of how you can greet the world are endless.
ThreadComputation module is hosted on GitHub, fully tested with automatic Actions call. You are welcome to fork and contribute new functions and features of the BUND.
go get github.com/vulogov/ThreadComputation
or you can check out the module and run
make pre; make
If you are planning to change BUND syntax, you must have ANTLR4 for Go installed.
make rebuild
will rebuild ANTLR4 code.
import "github.com/vulogov/ThreadComputation"
After you imported the module, you have to create TC instance
tc := ThreadComputation.Init()
This function call will create a BUND VM and initialize all structures for VM. Initial stack will be created for you.
tc = tc.Eval("BUND code goes here")
This call evaluates and executed a BUND code in created VM instance.
if tc.Errors() != 0 {
log.Fatalf(tc.Error())
}
if tc.Ready() {
res := tc.Get()
}
This function will test if stack have any value to return and return that value as an interface{}.
Information about ThreadComputation package is available on https://pkg.go.dev
Source code available on GitHub: https://github.com/vulogov/ThreadComputation
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.