Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
This package exposes the C/C++ library for OSDP devices to python to enable rapid prototyping of these devices. There are two modules exposed by this package:
osdp_sys
: A thin wrapper around the C/C++ API; this is a low level API and
is no longer recommended to use this directly.
osdp
: A wrapper over the osdp_sys
to provide python friendly API; this
implementation which is now powering the integration testing suit used to test
all changes made to this project.
You can install LibOSDP from PyPI using,
pip install libosdp
Or, from github,
pip install -e "git+https://github.com/goToMain/libosdp#egg=libosdp&subdirectory=python"
Or, from source using,
git clone https://github.com/goToMain/libosdp --recurse-submodules
cd libosdp/python
python3 setup.py install
# Create a communication channel
channel = SerialChannel("/dev/ttyUSB0")
# populate osdp_pd_info_t from python
pd_info = [
PDInfo(101, channel, scbk=KeyStore.gen_key()),
]
# Create a CP device and kick-off the handler thread and wait till a secure
# channel is established.
cp = ControlPanel(pd_info, log_level=LogLevel.Debug)
cp.start()
cp.sc_wait_all()
while True:
## Check if we have an event from PD
led_cmd = { ... }
event = cp.get_event(pd_info[0].address)
if event:
print(f"CP: Received event {event}")
# Send LED command to PD-0
cp.send_command(pd_info[0].address, led_cmd)
see examples/cp_app.py for more details.
# Create a communication channel
channel = SerialChannel("/dev/ttyUSB0")
# Describe the PD (setting scbk=None puts the PD in install mode)
pd_info = PDInfo(101, channel, scbk=None)
# Indicate the PD's capabilities to LibOSDP.
pd_cap = PDCapabilities()
# Create a PD device and kick-off the handler thread and wait till a secure
# channel is established.
pd = PeripheralDevice(pd_info, pd_cap)
pd.start()
pd.sc_wait()
while True:
# Send a card read event to CP
card_event = { ... }
pd.notify_event(card_event)
# Check if we have any commands from the CP
cmd = pd.get_command()
if cmd:
print(f"PD: Received command: {cmd}")
see examples/pd_app.py for more details.
FAQs
Library implementation of IEC 60839-11-5 OSDP (Open Supervised Device Protocol)
We found that libosdp demonstrated a healthy version release cadence and project activity because the last version was released less than 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.