
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.
@roblabla/php-serialization
Advanced tools
A library used to serialize and unserialize like it was in php (especially useful for manipulating laravel sessions stored with redis server)
Javascript tool to unserialize php serialized data, or to serialize data the way php does. This was originally used in manipulating php session stored in redis server.
Install from npm:
npm install php-serialization
var unserialize=require("php-serialization").unserialize;
var result=unserialize("a:1:{s:3:\"key\";s:11:\"hello world\"}");
console.log(result.key);
//hello world
var serialize=require("php-serialization").serialize;
var Class=require("php-serialization").Class;
var c=new Class("") //array
var o=new Class("MongoId") //object
o.__addAttr__("_value","string","123efa21bc123","string");
o.__addAttr__("_private_value","string","i'm private","string","private");
o.__addAttr__("_protected_value","string","i'm protected","string","protected");
c.__addAttr__("_id","string",o,"object");
console.log(serialize(c,"array"));
//a:1:{s:3:"_id";O:7:"MongoId":3:{s:6:"_value";s:13:"123efa21bc123";s:23:"MongoId_private_value";s:11:"i'm private";s:19:"*_protected_value";s:13:"i'm protected";}}
This project was originally used in manipulating sessions between Nodejs and Laravel 4. So certain code complexities were added to implement all Laravel 4 session serialization feature.
B [01]
D [0-9]
S [a-zA-Z0-9_]
K integer|string
V integer|string+|float|boolean|null|class|array|object
integer i:<D+>; //i:<value>;
float d:<D+.D+>; //d:<value>;
string s:<D+>:"<S+>"; //s:<length of string>:"<string>";
boolean b:<B>; //b:<true of false>; notice that it can only be either 1 or 0;
null n; //
class c:<D+>:"<S+>":<D+>:{<S+>} //c:<length of class name>:<class name>:<length of value>:{<value>} notice that this is a general class, it presents the serialized valye of a class (reasons are still unknown,only seen in laravel). For general meaning class,please see *Object*
array a:<D+>:{<[KV]+>} //a:<size of properties>:{<property_key><property_value>......}
object o:<D+>:"<S+>":<D+>:{<[KV]+>} //o:<length of object/class name>:"<object/class name>":<size of properties>:{<property_key><property_value>......}
resource r:<D+>; //r:<resource id>;
####serialize(obj:*,type:string);
type is the value from above format list;
####new Class(name:string);
if name is null,it means it's a normal array/object (not a class)
####Class.__has__(key:string);
####Class.__addAttr__(key:*,keyType:string,value:*,valueType:string,scope:string="public",getter:Function=default,setter:Function=default);
notice that *key* can only be integer or string;
*keyType* and *valueType* indicates the type of key/value;
*scope* can be public,protected,private ;
*getter* and *setter* are called when getting/setting this value. default setter/getter are provided,which would be simple return/set values.(eg,without typechecking,etc);
####Class.__typeOf__(key:string); ####Class.__keyTypeOf__(key:string); ####Class.__scopeOf__(key:string);
FAQs
A library used to serialize and unserialize like it was in php (especially useful for manipulating laravel sessions stored with redis server)
The npm package @roblabla/php-serialization receives a total of 1 weekly downloads. As such, @roblabla/php-serialization popularity was classified as not popular.
We found that @roblabla/php-serialization 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.