mirror of
https://github.com/shadow1ng/fscan.git
synced 2025-09-14 14:06:44 +08:00

- 重构SSH/MySQL/Redis插件超时控制,移除第三方库超时依赖 - 统一使用Go Context超时机制,提升超时控制可靠性和精确度 - 扩展MySQL/Redis/SSH插件默认端口支持,提升扫描覆盖率 - 修复插件系统中ConcurrentScanConfig超时配置缺失问题 - 优化插件检测逻辑,正确识别新架构插件并显示准确状态信息 - 解决插件在错误端口上长时间等待问题,显著提升扫描效率
72 lines
1.6 KiB
Plaintext
72 lines
1.6 KiB
Plaintext
# SSH测试环境配置文件
|
|
# 注意:此配置为测试环境特别设计,包含多个安全风险,仅用于测试目的
|
|
|
|
# 基本设置
|
|
Port 22
|
|
Protocol 2
|
|
HostKey /etc/ssh/ssh_host_rsa_key
|
|
HostKey /etc/ssh/ssh_host_dsa_key
|
|
HostKey /etc/ssh/ssh_host_ecdsa_key
|
|
HostKey /etc/ssh/ssh_host_ed25519_key
|
|
|
|
# 日志记录
|
|
SyslogFacility AUTH
|
|
LogLevel INFO
|
|
|
|
# 认证设置 - 为测试目的启用各种认证方式
|
|
LoginGraceTime 60
|
|
PermitRootLogin yes
|
|
StrictModes no
|
|
MaxAuthTries 6
|
|
MaxSessions 10
|
|
|
|
# 密码认证设置(为测试启用)
|
|
PasswordAuthentication yes
|
|
PermitEmptyPasswords yes
|
|
ChallengeResponseAuthentication no
|
|
|
|
# 公钥认证设置
|
|
PubkeyAuthentication yes
|
|
AuthorizedKeysFile %h/.ssh/authorized_keys
|
|
|
|
# 其他认证方式
|
|
KbdInteractiveAuthentication no
|
|
UsePAM yes
|
|
|
|
# 网络设置
|
|
X11Forwarding yes
|
|
X11DisplayOffset 10
|
|
PrintMotd no
|
|
PrintLastLog yes
|
|
TCPKeepAlive yes
|
|
|
|
# 接受环境变量
|
|
AcceptEnv LANG LC_*
|
|
|
|
# SFTP子系统
|
|
Subsystem sftp /usr/lib/openssh/sftp-server
|
|
|
|
# 用户特定配置
|
|
# 允许所有用户通过SSH访问
|
|
AllowUsers root root2 admin test user guest oracle mysql ftp web service postgres redis mongodb anonymous
|
|
|
|
# 监听地址
|
|
ListenAddress 0.0.0.0
|
|
|
|
# 为测试目的,设置宽松的连接限制
|
|
MaxStartups 100:30:200
|
|
ClientAliveInterval 30
|
|
ClientAliveCountMax 3
|
|
|
|
# 设置不同用户的特殊权限(用于测试不同场景)
|
|
Match User anonymous
|
|
PermitEmptyPasswords yes
|
|
PasswordAuthentication yes
|
|
|
|
Match User guest
|
|
ChrootDirectory /home/guest
|
|
ForceCommand internal-sftp
|
|
PermitTunnel no
|
|
AllowAgentForwarding no
|
|
AllowTcpForwarding no
|
|
X11Forwarding no |