
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
frida-trace
Advanced tools
Trace APIs declaratively through Frida.
import trace from 'frida-trace';
const func = trace.func;
const argIn = trace.argIn;
const argOut = trace.argOut;
const retval = trace.retval;
const types = trace.types;
const pointer = types.pointer;
const INT = types.INT;
const POINTER = types.POINTER;
const UTF8 = types.UTF8;
trace({
module: 'libsqlite3.dylib',
functions: [
func('sqlite3_open', retval(INT), [
argIn('filename', UTF8),
argOut('ppDb', pointer(POINTER), when('result', isZero)),
]),
func('sqlite3_prepare_v2', retval(INT), [
argIn('db', POINTER),
argIn('zSql', [UTF8, bind('length', 'nByte')]),
argIn('nByte', INT),
argOut('ppStmt', pointer(POINTER), when('result', isZero)),
])
],
callbacks: {
onEvent(event) {
console.log('onEvent! ' + JSON.stringify(event, null, 2));
},
onEnter(event, context) {
event.trace = Thread.backtrace(context)
.map(DebugSymbol.fromAddress)
.filter(x => x.name);
},
onError(e) {
console.error(e);
}
}
});
function isZero(value) {
return value === 0;
}
$ ./bin/parse-header.js /usr/include/sqlite3.h | ./bin/generate-boilerplate.js
trace({
module: 'libfoo.dylib',
functions: [
func('sqlite3_libversion', retval(UTF8), []),
func('sqlite3_sourceid', retval(UTF8), []),
func('sqlite3_libversion_number', retval(INT), []),
func('sqlite3_compileoption_used', retval(INT), [
argIn('zOptName', UTF8)
]),
func('sqlite3_compileoption_get', retval(UTF8), [
argIn('N', INT)
]),
func('sqlite3_threadsafe', retval(INT), []),
func('sqlite3_close', retval(INT), [
argIn('a1', POINTER)
]),
func('sqlite3_close_v2', retval(INT), [
argIn('a1', POINTER)
]),
func('sqlite3_exec', retval(INT), [
argIn('a1', POINTER),
argIn('sql', UTF8),
argIn('callback', POINTER),
argIn('a4', POINTER),
argOut('errmsg', pointer(POINTER), when('result', isZero))
]),
...
FAQs
Trace APIs declaratively
The npm package frida-trace receives a total of 52 weekly downloads. As such, frida-trace popularity was classified as not popular.
We found that frida-trace demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.