
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
github.com/flaviostutz/ssh-tunnels
A SSH server that authorizes PTY, remote or local port forwarding based on JWT token entered as password.
View ENVs and Usage for more information on how to launch this.
version: '3.7'
services:
ssh-tunnels:
image: flaviostutz/ssh-jwt
ports:
- "2222:22"
environment:
- LOG_LEVEL=debug
- JWT_KEY=123
- ENABLE_REMOTE_FORWARDING=true
- ENABLE_LOCAL_FORWARDING=true
- ENABLE_PTY=true
run docker-compose up
Open http://jwt.io
Create a JWT key with the following contents
header
{
"alg": "HS512",
"typ": "JWT"
}
payload
{
"aid": "234243453453",
"mid": "GTE3456",
"exp": 1587529693,
"rfw": "0.0.0.0:4343 0.0.0.0:4242",
"lfw": "10.1.1.254:80 10.1.1.254:81 45.55.44.56:80",
"pty": "true"
}
signature use password "123"
Copy the encoded/signed JWT contents to clipboard
In a terminal, run
ssh root@localhost -p 2222
When asked for password, paste Enconded JWT contents
If all is OK, you will be connected to a shell session.
Modify JWT claim "pty" to "false" and try to connect again
If the token is invalid or it doesn't have claim "pty", you connection will be refused.
version: '3.7'
services:
ssh-tunnels:
image: flaviostutz/ssh-jwt
ports:
- "2222:22"
secrets:
- rs-pub-key
environment:
- JWT_ALGORITHM=RS512
- JWT_KEY_SECRET_NAME=rs-pub-key
- ENABLE_LOCAL_FORWARDING=true
- ENABLE_REMOTE_FORWARDING=true
- ENABLE_PTY=true
- LOG_LEVEL=debug
secrets:
rs-pub-key:
file: ./test_rsa.pub
Create a JWT key with the following contents
JWS Algo: RS512
Payload
{
"aid": "234243453453",
"mid": "GTE3456",
"exp": 1587529693,
"rfw": "0.0.0.0:4343 0.0.0.0:4242",
"lfw": "10.1.1.254:80 10.1.1.254:81 45.55.44.56:80",
"pty": "true"
}
Click on "Generate JWS Keys"
Create file test_rsa.pub with public key contents
Create file test_rsa.key with private key contents
Copy the contents of the JWT key from the "Serialize" field from the site
Run docker-compose up
On another terminal, run
ssh root@localhost -p 2222 -L 0.0.0.0:1212:10.1.1.254:80
On a third terminal run
curl localhost:1212
If any web server is running on 10.1.1.254:80 it will get its contents
rfw - a list of space separated "[bindhost]:[port]" indicating authorized remote port forward binds. ex.: "0.0.0.0:4444" will accept remote port forwarding to the other side
lfw - a list of space separated "[desthost]:[port]" indicating authorized local port forwards destinations. ex.: "201.22.123.43:80" will accept local port forwardings to 201.22.123.43 through the ssh tunnel
pty - permit interactive terminal sessions in shell if "true"
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.