
Research
Two Malicious Rust Crates Impersonate Popular Logger to Steal Wallet Keys
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
This example can be found in examples/simple-function.
const express = require("express")
, expose = require("expose-js")
, fs = require("fs");
var clickCount = 0;
expose.function("getMessage", function() {
this.callback("This button has been clicked " + ++clickCount + " times.");
});
var app = express();
// use expose to handle exposed function calls and object getters/setters
app.use(expose);
// serve expose script to allow us to use exposed functions and objects
app.get("/server.js", expose.script("server"));
// serve app.html
app.get("/", function(req, res) {
res.writeHead(200, {"Content-Type": "text/html"});
res.end(fs.readFileSync("app.html"));
});
// redirect any other traffic to /
app.use(function(req, res) {
res.redirect("/");
});
app.listen(3000);
<button id="btn">Click me</button>
<script src="/server.js"></script>
<script>
(function() {
var btn = document.getElementById("btn");
btn.onclick = function(e) {
if(btn.disabled) return;
btn.disabled = true;
server.getMessage(function(msg) {
btn.textContent = msg;
btn.disabled = false;
});
};
}());
</script>
FAQs
Expose JavaScript functions, and objects on server to the browser.
We found that expose-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
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
Socket uncovers malicious Rust crates impersonating fast_log to steal Solana and Ethereum wallet keys from source code.
Research
A malicious package uses a QR code as steganography in an innovative technique.
Research
/Security News
Socket identified 80 fake candidates targeting engineering roles, including suspected North Korean operators, exposing the new reality of hiring as a security function.