
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
A ruby gem for Safe-T Box REST API
gem install safe-t-rest
require 'safe-t-rest'
client = SafeTRest.new
set using hash:
client = SafeTRest.new(url: 'https://Safe-T/ui_api/login.aspx', user_name: 'test', password: '123', extension_id: '1', role_id: '0')
client.url = 'https://Safe-T_Box_Site.com/ui_api/login.aspx'
client.username = 'test'
client.password = '12345'
client.extension_id = '435-34534-24-234-6'
client.role_id = '00006'
puts client.get_apps_process_state('my_packge_GUID.123123')
puts client.get_package_file_list('my_packge_GUID.123123')
args = {
:files => 'file.txt', # name of file to share
:recipients => 'alexander.dan@safe-t.com', # Email address of the one you want to share with
:sender_name => 'Bar Hofesh',
:sender_address => 'bar.hofesh@safe-t.com',
:subject => 'Testing Ruby API', # Email Subject
:message => 'This is a Test message, just checking the Ruby API using REST', # Email body message
:message_encryption_level => '0', # 0 = high, 1 = normal, 2 = low
:delivery_method => '0',
:mobile_recipient => '',
:return_receipt => true, # get back a notification when the file was downloaded
:safe_reply => true, # send an safe reply invitation
:max_downloads => '3', # maximum number of allowed downloads
:package_expiry => '1440', # in minutes
:folder_path => '', # empty means root folder
:root_folder_id => '417' # My Storage ID
}
client.safe_share_file(args)
args = {
:file_base64 => 'V29ya2luZyA6KQo=', # the file as a base64 string Base64.encode64(File.read(file))
:file_name => 'file.txt', # the name of the file
:folder_path => '', # empty means root folder
:root_folder_id => 417 # My Storage ID
}
client.file_upload(args)
args = {
:file_name => 'file.txt', # The name of the file to download
:folder_path => '', # The path of the file
:root_folder_id => 417 # My Storage ID
}
file = client.file_download(args) # Get back the file as a base64 string
file = Base64.decode64(file) # decode the string
File.write('file.txt', file) # write decoded file
StatusCode=OK&StatusData=Base64Json
Base64Json:
{
"flow": [
"username_password",
"sms"
]
"token": [
"3434",
"7676"
]
}
if there is no token element, SDA need to generate token.
Login to portal: (https://securemft/Safe-T/login.aspx)
SDA will send a rest call with URL and add sType :
https://securemft/Safe-T/login.aspx&sType=login
{"RoleID": "00006", "ExtensionID": "226602f2-4960-4542-a489-8250a551b804", "Username":"", "Password":"", "Method": "RegisterSession","Arguments": ["https://securemft/Safe-T/login.aspx&sType=login"]}
Return value:
StatusCode=OK&StatusData=
{
"flow": [
"username_password",
"sms"
]
}
Handle return value
{
"RoleID": "00006",
"ExtensionID": "226602f2-4960-4542-a489-8250a551b804",
"Username":"",
"Password":"",
"Method": "iVerifyUserAccount",
"Arguments": ["base64username","base64pass",true]
}
Return value:
OK:Q2xpZW50TW93NyI=
base64 string is "05977777777"
- If its ok + number :
go to second step
else handle retries and captcha
- if there is no number ? we need to ask alex\eithan.
- second step : sms - send sms to the ClientMobileNumber and validate it
else handle retries and captcha
Any other case : https://securemft/Safe-T/login.aspx?folderType=x&(query_string_params) (packages related url's ,safe reply,package view, registration)
{
"RoleID": "00006",
"ExtensionID": "226602f2-4960-4542-a489-8250a551b804",
"Username":"",
"Password":"",
"Method": "iVerifyUserAccount",
"Arguments": ["base64username","base64pass",true]
}
Return value:
in case of registers users:
StatusCode=OK&StatusData=
{
"flow": [
"username_password",
"sms"
]
"token": [
"3434",
"7676"
]
}
if flow is :
"username_password",
"sms"
{ "RoleID": "00006", "ExtensionID": "226602f2-4960-4542-a489-8250a551b804", "Username":"", "Password":"", "Method": "iVerifyUserAccount", "Arguments": ["base64username","base64pass",true] }
Return value:
OK:Q2xpZW50TW93NyI=
base64 string is "05977777777"
- If its ok + number :
go to second step
else handle retries and captcha
- if there is no number ? we need to ask alex\eithan.
- second step : sms - send sms to the ClientMobileNumber and validate it
else handle retries and captcha
http://www.rubydoc.info/github/bararchy/safe-t-rest/SafeTRest
FAQs
Unknown package
We found that safe-t-rest 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
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.