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.
Client information detector, for auto detect user agent, include:
Detected information data structure like:
detector = {
device: {
name: "iphone",
version: -1,
fullVersion: "-1",
[iphone]: -1
},
os: {
name: "ios",
version: 6.1,
fullVersion: "6.1",
[ios]: 6.1
},
browser: {
name: "chrome":
version: 26.0,
fullVersion: "26.0.1410.50",
mode: 26.0,
fullMode: "26.0.1410.50",
compatible: false,
[chrome]: 26.0
},
engine: {
name: "webkit",
version: 536.26,
fullVersion: "536.26",
mode: 523.26,
fullMode: "523.26",
compatible: false,
[webkit]: 536.26
}
}
Note: Above [iphone]
, [ios]
, [chrome]
, [webkit]
is dynamically from
actual environment, different device, operation system, browser and rendering
engine is different.
Note:
detector
.via npm:
Installation to global (with -g
argument), you can use detector
command in
terminal.
npm install detector [-g]
via spm:
spm install detector
Some examples in common use:
// Detect browser name.
detector.browser.name === "chrome" // true
// An other example for detect browser name.
!!detector.browser.ie // false
// Detect the old browseres.
if(detector.browser.ie && detector.browser.version < 8){
alert("You browser is too old.");
}
// Detect rendering engine below Trident 4 (IE8).
if(detector.engine.trident && detector.engine.mode < 4){
// hack code.
}
// Collect client detail informations.
detector.browser.name + "/" + detector.browser.fullVersion;
Name of hardware device.
Version of hardware device.
Full version of hardware device.
Detect name of hardware device.
Support hardware devices:
pc
: Windows PC.mac
: Macintosh PC.iphone
: iPhone.ipad
: iPad.ipod
: iPod.android
: Android.blackberry
: Blackberry mobile.wp
: Windows Phone.mi
: Xiaomi.meizu
: meizu.nexus
: Nexus.nokia
: Nokia.samsung
: samsung.aliyun
: Aliyun.huawei
: Huawei (华为)lenovo
: lenovo.zte
: ZTE Corporation (中兴)vivo
: vivo (步步高)htc
: HTC.oppo
: OPPO.konka
: konka (康佳)sonyericsson
: sonyericsson (索尼爱立信)coolpad
: coolpad (酷派)lg
: LG.Following hardware device support in NodeJS version of detector
:
noain
: 诺亚信huawei-honor
: 华为荣耀lephone
: 乐 Phoneasus
: 华硕alcatel
一加
蓝米
E 派
hike
qmi
友信达
: 友信达优米
嘉源
intki
星语
欧奇
海派
广信
: 广信nibiru
: nibiru神州
青橙
海信
金立
eton
bohp
小杨树
语信
nubia
爱讯达
寰宇通
mofut
infocus
大唐
邦华
天迈
大显
博瑞
lingwin
iusai
波导
德赛
蓝魔
美图
opsson
benwee
hosin
smartisan
: 锤子, Smartisan.ephone
佰事讯
newman
konka
haier
moto
tcl
天语
doov
天时达
Name of operation system.
Version of operation system.
Full version of operation system.
Detect name of operation system.
Support operation system list:
windows
: Windows.macosx
: Macintosh.ios
: iOS.android
: Android.chromeos
: Chrome OS.linux
: Linux.wp
: Windows Phone.windowsce
: Windows CE, include Windows Mobile, Smartphone, PPC.symbian
: Symbian OS.blackberry
: Blackberry OS.yunos
: Aliyun OS.Following operation system support in NodeJS version of detector
:
meego
: Meego.smartisan
: Smartisan.Name of browser.
Real version of browser.
In compatibility-mode, Internet Explorer declare it is a old browser.
but detector.browser.version
return the real version of browser.
For example:
IE9 declare it is a IE7 in compatibility-mode, but detector.browser.version
return 9.0
.
Full (real) version of browser.
Browser-mode. In Internet Explorer's compatibility-mode, version and mode is different.
Full mode of browser.
Detect name of browser.
Support browser list:
edge
: Microsoft Edge browser.ie
: Microsoft Internet Explorer.chrome
: Google Chrome.firefox
: Mozilla Firefox.safari
: Apple Safari.opera
: Opera.360
: Qihu 360 browser.maxthon
: Maxthon.sogou
: Sogou.theworld
: TheWorld.green
: GreenBrowser.qq
: QQ Browser.tt
: TencentTraveler.liebao
: Cheetah Mobile Inc. (猎豹) Browser.tao
: Taobao (淘宝) Browser.coolnovo
: coolnovo (枫树)saayaa
: Saayaa (闪游)uc
: UC Browser.mi
: Build-in browser in Xiaomi (小米).baidu
: Baidu (百度) browser.nokia
: Build-in Browser in Nokia (诺基亚)blackberry
: 黑莓默认浏览器,版本号与系统版本相同。webview
: iOS WebView.yandex
: Yandex YaBrowser.micromessenger
WeChat (微信)ali-ap
: 支付宝手机钱包。ali-ap-pd
: 支付宝平板客户端。ali-am
: 支付宝商户客户端。ali-tb
: 淘宝手机客户端。ali-tb-pd
: 淘宝平板客户端。ali-tm
: 天猫手机客户端。ali-tm-pd
: 天猫平板客户端。googlebot
: Googlebotbaiduspider
: Baiduspider ,百度无线、网页搜索baiduspider-image
: 百度图片搜索baiduspider-video
: 百度视频搜索baiduspider-news
: 百度新闻搜索baiduspider-favo
: 百度收藏搜索baiduspider-cpro
: 百度联盟baiduspider-ads
: 百度商务搜索baiduboxapp
: 百度手机搜索客户端bingbot
: Bingbot 网络爬虫。msnbot
: MSNBotnuhkbot
: Nuhkbotalexabot
: Alexabot.curl
: curl.slurpbot
: Yahoo! SlurpJudge is browser in compatibility-mode.
Name of rendering engine.
Version of rendering engine.
Full version of rendering engine.
Mode of rendering engine.
Full-mode of rendering engine.
Detect name of rendering engine.
Support rendering engine list:
edgehtml
: Microsoft Edge browser's rendering engine. (Note: version same browser version now.)trident
: Microsoft Trident.blink
: Google Blink.webkit
: Apple Webkit.gecko
: Mozilla Gecko.presto
: Opera Presto.androidwebkit
: Android Webkit.coolpadwebkit
: Coolpad Webkit.u2
: UC browser rendering engine v2
.u3
: UC browser rendering engine v3
.Parse user agent string, return a detector
object.
Not Available information:
na
.-1
.2.4.0 (2015-08-23)
FAQs
The module for detect client-side information.
We found that detector 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.