
Research
/Security News
9 Malicious NuGet Packages Deliver Time-Delayed Destructive Payloads
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.
mock-ssh-server
Advanced tools
mock-ssh-server packs a Python context manager that implements an SSH
server for testing purposes. It is built on top of paramiko_, so it does
not need OpenSSH binaries to be installed.
As a py.test_ fixture::
import os
from pytest import yield_fixture
import mockssh
@yield_fixture()
def server():
users = {
"sample-user": "/path/to/user-private-key",
}
with mockssh.Server(users) as s:
yield s
def test_ssh_session(server):
for uid in server.users:
with server.client(uid) as c:
_, stdout, _ = c.exec_command("ls /")
assert stdout.read()
def test_sftp_session(server):
for uid in server.users:
target_dir = tempfile.mkdtemp()
target_fname = os.path.join(target_dir, "foo")
assert not os.access(target_fname, os.F_OK)
with server.client(uid) as c:
sftp = c.open_sftp()
sftp.put(__file__, target_fname, confirm=True)
assert os.access(target_fname, os.F_OK)
.. _paramiko: http://www.paramiko.org/ .. _py.test: http://pytest.org/latest/ .. image:: https://travis-ci.org/carletes/mock-ssh-server.svg :target: https://travis-ci.org/carletes/mock-ssh-server
FAQs
Mock SSH server for testing purposes
We found that mock-ssh-server demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 3 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.

Research
/Security News
Socket researchers discovered nine malicious NuGet packages that use time-delayed payloads to crash applications and corrupt industrial control systems.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.