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.
github.com/xyctruth/profiler
Profiler 是一个基于 go pprof 与 go trace 持续性能剖析工具
trace
fgprof
profile
mutex
heap
goroutine
allocs
block
threadcreate
图表趋势 | 点击气泡跳转 Profile 详情 |
点击气泡跳转 Trace 详情 | 点击气泡跳转 Trace 详情 |
启动服务端 端口为:8080
go run server/main.go
启动前端 端口为:80
cd ui
npm install --registry=https://registry.npm.taobao.org
npm run dev --base_api_url=http://localhost:8080
docker run -d -p 80:80 --name profiler xyctruth/profiler:latest
使用自定义的配置文件
mkdir ~/profiler-config/
cp ./collector.yaml ~/profiler-config/
docker run -d -p 80:80 -v ~/profiler-config/:/profiler/config/ --name profiler xyctruth/profiler:latest
使用持久化数据
docker run -d -p 80:80 -v ~/profiler-data/:/profiler/data/ --name profiler xyctruth/profiler:latest
安装 Profiler chart:
helm install --create-namespace -n profiler-system profiler ./charts/profiler
更多说明在 Helm docs 中
需要被收集分析的 golang
程序,需要提供 net/http/pprof
端点,并配置在 ./collector.yaml
配置文件中。
配置文件可以在线更新,收集程序会监听配置文件的变化,即时应用变化后的配置文件。
collector.yaml
collector:
targetConfigs:
profiler-server: # 目标名称
interval: 15s # 抓取间隔
expiration: 0 # 无过期时间
instances: ["localhost:9000"] # 目标服务host
labels:
namespace: f005
type: gateway
profileConfigs: # 使用默认配置
server2:
interval: 10s
expiration: 168h # 过期时间7天
instances: ["localhost:9000"]
labels:
namespace: f004
type: svc
profileConfigs: # 覆盖部分默认配置字段
trace:
enable: false
fgprof:
enable: false
profile:
path: /debug/pprof/profile?seconds=10
enable: false
heap:
path: /debug/pprof/heap
profileConfigs
默认配置
默认 trace 分析关闭, 因为 trace 文件过大,大约在(500KB ~ 2M), 需要开启 trace 分析在 collector.yaml
设置覆盖默认的 trace 配置.
profileConfigs:
profile:
path: /debug/pprof/profile?seconds=10
enable: true
fgprof:
path: /debug/fgprof?seconds=10
enable: true
mutex:
path: /debug/pprof/mutex
enable: true
heap:
path: /debug/pprof/heap
enable: true
goroutine:
path: /debug/pprof/goroutine
enable: true
allocs:
path: /debug/pprof/allocs
enable: true
block:
path: /debug/pprof/block
enable: true
threadcreate:
path: /debug/pprof/threadcreate
enable: true
trace:
path: /debug/pprof/trace?seconds=10
enable: false
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.
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.