Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
@jovercao/sftpd
Advanced tools
Sftpd is the sftp server by nodejs, with permission virtual path.
Cofigure file is 3 parts:
app.config.json
..sftpd.json
..sftpd.json
.The configuration load order: App configuration -> User configuration -> Workspace configuration,The post-loaded configuration overrides the previously loaded configuration.
Settings:
# example/app.config.json
{
// The host cert file,the ${appRoot} variable is dir of then executable file。
"hostKeyFile": "${appRoot}/host_rsa",
// default data dir, user root dir on that "dataDir/username"
"dataDir": "${appRoot}/datas",
// Greetings message
"greeting": "Good luck!",
// banner message
"banner": "Wellcome to SFTP test server.",
"ident": "sftp server by jover",
// use debug mode
"debug": true,
// The maximum of connections for server
"maxConnections": 1000,
// user list
"users": [
{
"username": "test1",
// Password, encryption by hmac-sha256,and format with base64 encoding.
"password": "4Dp32BhmHO533HGr5Pp3wFuZT216jc5hGLjxGGV+BOw=",
// User root dir, the location of virtual path "/"
"rootDir": "${appRoot}/datas/testUser",
// The maximum of connections on for user
"maxConnections": 1,
"permission": {
"MKDIR": true,
"RMDIR": true,
// read file
"READ": true,
// write file
"WRITE": true,
// Remove file
"REMOVE": true,
// Create file
"CREATE": true
}
},
{
"username": "test2",
"password": "4Dp32BhmHO533HGr5Pp3wFuZT216jc5hGLjxGGV+BOw=",
"permission": {
"MKDIR": true,
"RMDIR": true,
"READ": true,
"WRITE": true,
"REMOVE": true,
"CREATE": true
}
}
],
// server listen port
"port": "22",
// Is enable ttl,default value false
"ttlEnable": false,
// lock
"ipLockTimes": 5,
// If connections count is over ipLockTimes in ipLockSpan by same ip, the ip will be locked.
"ipLockSpan": 300,
// If not locked, the connections cout will be clean after ipLockTTL seconds.
"ipLockTTL": 30,
// log4js configrations see:`https://github.com/log4js-node/log4js-node`
// "log": {...}
}
npm install
npm run example
Pls look for help:
sftpd -h
reconfigure
command, support hot reload configstop
command, stop servicesftpd is base by ssh2, thanks mscdex。
FAQs
A sftp server by nodejs.
We found that @jovercao/sftpd 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.