当前位置:首页>Linux>等保测评命令——Gentoo Linux

等保测评命令——Gentoo Linux

  • 2026-03-27 00:40:36
等保测评命令——Gentoo Linux

各位大佬,想看那种网络设备/操作系统/数据库/中间件的测评命令清单,可在留言区留言,我会以最快速度给你们总结,然后发出来!

依据 GB/T 22239-2019《信息安全技术 网络安全等级保护基本要求》第三级"安全计算环境" 条款,结合 Gentoo Linux 官方安全指南、CIS Gentoo Benchmark 及多家测评机构现场实践,给出可直接落地的 测评命令清单

已在 Gentoo Linux (amd64/x86_64, OpenRC/systemd) 环境验证通过,支持 Stage3 / Systemd / musl / SELinux 多种配置组合。


一、身份鉴别(8.1.4.1)

1.1 账户唯一性与密码策略

控制项
测评命令
达标判据
空口令检查
awk -F: '$2==""{print $1}' /etc/shadow
无输出
密码锁定账户
awk -F: '$2~"^!"{print $1}' /etc/shadow
核实锁定原因
密码有效期
grep -E 'PASS_MAX_DAYS|PASS_MIN_DAYS|PASS_WARN_AGE' /etc/login.defs
≤90天,≥1天,≥7天预警
密码复杂度
grep -r 'minlen|dcredit|ucredit|ocredit|lcredit' /etc/security/pwquality.conf /etc/pam.d/system-auth
启用pam_pwquality,minlen=8,minclass=3
密码历史
grep 'remember' /etc/pam.d/system-auth /etc/pam.d/passwd
remember≥12

Gentoo特有配置:

# Gentoo使用OpenRC或systemd,PAM配置与传统发行版略有不同# 查看密码策略(Gentoo默认使用pam_pwquality)cat /etc/pam.d/system-auth | grep pam_pwqualitycat /etc/security/pwquality.conf# 查看用户密码状态chage -l username# 查看所有用户密码过期信息for user in $(awk -F: '$3>=1000{print $1}' /etc/passwd); do    echo "=== $user ==="    chage -l $user 2>/dev/null | head -5done# Gentoo特有:查看make.conf中安全相关USE标志grep -E 'USE.*-pam|USE.*passwdqc|USE.*cracklib' /etc/portage/make.conf /etc/portage/package.use/* 2>/dev/null# 检查是否启用passwdqc(替代pwquality)cat /etc/pam.d/system-auth | grep pam_passwdqccat /etc/security/passwdqc.conf 2>/dev/null

1.2 登录失败处理与会话超时

控制项
测评命令
达标判据
登录失败锁定
cat /etc/pam.d/system-auth /etc/pam.d/login | grep pam_faillock
deny=5,unlock_time=300
失败记录查看
faillock --user username
查看具体用户失败记录
会话超时
echo $TMOUT
 / cat /etc/profile.d/tmout.sh
TMOUT=600(秒)
SSH超时
grep -E 'ClientAliveInterval|ClientAliveCountMax' /etc/ssh/sshd_config
300秒无操作断开

Gentoo特有配置:

# Gentoo默认使用pam_faillock(替代pam_tally2)cat /etc/pam.d/system-auth | grep faillockcat /etc/pam.d/login | grep faillockcat /etc/security/faillock.conf 2>/dev/null# 查看特定用户失败记录faillock --user rootfaillock --user username --reset# 查看全局超时配置(Gentoo推荐/etc/profile.d方式)cat /etc/profile.d/tmout.sh 2>/dev/null || grep TMOUT /etc/profile /etc/bash/bashrc# Gentoo特有:OpenRC服务超时配置grep 'rc_timeout' /etc/rc.conf 2>/dev/null# 查看SSH安全配置(Gentoo默认较严格)grep -E 'PermitRootLogin|Protocol|PasswordAuthentication|PubkeyAuthentication|ClientAlive' /etc/ssh/sshd_config# 检查是否安装并启用fail2banrc-status fail2ban 2>/dev/null || systemctl status fail2ban 2>/dev/nullcat /etc/fail2ban/jail.local 2>/dev/null | grep -E 'bantime|maxretry|backend'

1.3 远程管理安全

# 查看SSH服务状态(Gentoo使用OpenRC或systemd)rc-status sshd 2>/dev/null || systemctl status sshd 2>/dev/null || /etc/init.d/sshd status 2>/dev/null# 检查SSH安全配置grep -E 'PermitRootLogin|Protocol|PasswordAuthentication|PubkeyAuthentication|AllowUsers|AllowGroups' /etc/ssh/sshd_config# 查看SSH监听地址ss -tlnp | grep :22# 检查Telnet(应未安装)qlist -I telnet 2>/dev/null || emerge -pv telnet 2>/dev/null | grep -i telnet# 检查是否安装Dropbear或其他SSHqlist -I dropbear 2>/dev/null# 查看允许的SSH用户/组grep -E 'AllowUsers|AllowGroups|DenyUsers|DenyGroups' /etc/ssh/sshd_config# Gentoo特有:检查package.use中SSH相关安全标志grep -r 'ssh\|libressl\|openssl' /etc/portage/package.use/ 2>/dev/null | head -5

高风险项:启用Telnet或允许root远程登录、SSH使用Protocol 1、未限制SSH用户,直接判定不符合三级要求。


1.4 双因子认证(高风险项)

测评方法:

  • 访谈确认:是否采用"口令+Google Authenticator/硬件令牌/YubiKey"组合

  • 技术核查

# 检查Google Authenticator配置cat /etc/pam.d/sshd | grep google-authenticatorcat /etc/pam.d/login | grep google-authenticator# 检查YubiKey配置cat /etc/pam.d/sshd | grep yubikeyqlist -I yubikey 2>/dev/null || emerge -pv yubikey-personalization-gui 2>/dev/null# 检查智能卡/CCID配置cat /etc/pam.d/sshd | grep pam_pkcs11qlist -I opensc 2>/dev/null# 查看已安装的2FA软件包qlist -I | grep -E 'google-authenticator|yubikey|libu2f-host|pam_u2f'# 检查SSH密钥认证ls -la /home/*/.ssh/authorized_keys 2>/dev/null | head -5find /home -name "authorized_keys" -exec ls -la {} \; 2>/dev/null | head -5# Gentoo特有:检查是否使用libressl替代openssl(安全加固)qlist -I libressl 2>/dev/null && echo "使用LibreSSL替代OpenSSL"

二、访问控制(8.1.4.2)

2.1 账户与权限管理

控制项
测评命令
达标判据
系统账户
awk -F: '$3<1000 && $1!="root"{print $1}' /etc/passwd
仅保留必需系统账户
sudo授权
cat /etc/sudoers
 / ls -la /etc/sudoers.d/
最小权限原则,使用wheel组
关键文件权限
stat -c '%a %n' /etc/passwd /etc/shadow /etc/group /etc/gshadow
644/000/644/000
umask值
grep -r 'umask' /etc/profile.d/ /etc/profile /etc/bash/bashrc 2>/dev/null
022或027

Gentoo特有配置:

# Gentoo默认sudo配置(使用wheel组)grep '%wheel' /etc/sudoersgrep '%sudo' /etc/sudoers 2>/dev/null || echo "未使用sudo组,使用wheel组"ls -la /etc/sudoers.d/# 查看具体用户sudo权限sudo -l -U username# 检查doas配置(Gentoo轻量级替代sudo)cat /etc/doas.conf 2>/dev/nullqlist -I doas 2>/dev/null && echo "已安装doas"# 检查关键文件权限stat -c '%a %U:%G' /etc/passwd /etc/shadow /etc/group /etc/gshadow# Gentoo特有:检查OpenRC服务权限ls -la /etc/init.d/ | head -10stat -c '%a %U:%G' /etc/init.d/sshd /etc/init.d/cronie 2>/dev/null# 检查配置文件权限(Gentoo Portage)stat -c '%a %U:%G' /etc/portage/make.confstat -c '%a %U:%G' /etc/portage/package.use/

2.2 默认账户清理

# 确认默认账户禁用或删除grep -E 'games|news|uucp|proxy|www-data|backup|list|irc|gnats' /etc/shadow# Gentoo特有:检查portage用户(编译专用)grep 'portage' /etc/passwdid portage# 检查无登录shell的账户awk -F: '$7=="/sbin/nologin" || $7=="/bin/false" || $7=="/usr/sbin/nologin"{print $1}' /etc/passwd | head -10# 锁定不必要的账户sudo passwd -l games 2>/dev/nullsudo passwd -l news 2>/dev/null# Gentoo特有:检查是否安装不必要的基础系统组件cat /var/lib/portage/world | grep -E 'games|emulation|x11-drivers' | head -5# 检查是否启用multilib(32位兼容,如不需要应禁用)grep 'ABI_X86' /etc/portage/make.conf 2>/dev/null

2.3 SELinux/Grsecurity强制访问控制(Gentoo特色)

# 检查SELinux状态(Gentoo支持但非默认)sestatus 2>/dev/null || echo "SELinux未启用"getenforce 2>/dev/null# 检查是否使用hardened profile(Gentoo安全强化)eselect profile list | grep hardenedeselect profile show | grep hardened# 检查是否启用PaX/Grsecurity(内核级安全)grep -i 'pax\|grsec' /boot/config-$(uname -r) 2>/dev/null | head -10sysctl -a 2>/dev/null | grep pax# 检查是否启用RBAC(基于角色的访问控制)cat /etc/grsec/rbac.policy 2>/dev/null || echo "未配置Grsecurity RBAC"# 检查是否启用PIE/SSP/Fortify(编译时安全)grep -E 'CFLAGS|CXXFLAGS' /etc/portage/make.conf | grep -E 'fPIE|fstack-protector|D_FORTIFY'gcc -v 2>&1 | grep -i 'enable-default-pie\|enable-default-ssp'# 检查 hardened toolchainqlist -I | grep -E 'hardened|selinux|pax|grsec'

三、安全审计(8.1.4.3)

3.1 审计服务启用

控制项
测评命令
达标判据
auditd服务
rc-status auditd 2>/dev/null || systemctl is-active auditd
active & enabled
审计规则
auditctl -l | wc -l
≥30条
日志保留
grep -E 'max_log_file|num_logs' /etc/audit/auditd.conf
单文件≥50MB,保留≥6个月
日志权限
stat -c '%a %U:%G' /var/log/audit/audit.log
640 root:root

Gentoo特有配置:

# Gentoo auditd安装检查qlist -I audit 2>/dev/null || emerge -pv audit 2>/dev/null | head -3# 查看审计服务状态(OpenRC)rc-status auditdrc-update show auditd# 或systemdsystemctl is-active auditd && systemctl is-enabled auditd# 查看审计规则auditctl -l 2>/dev/null | wc -lauditctl -l 2>/dev/null | head -20# 查看审计规则文件ls -la /etc/audit/rules.d/cat /etc/audit/rules.d/audit.rules 2>/dev/null || cat /etc/audit/audit.rules# Gentoo特有:检查是否通过package.use启用audit USE标志grep 'audit' /etc/portage/package.use/* /etc/portage/make.conf 2>/dev/null# 生成审计报告ausearch --summary 2>/dev/null | head -20aureport --login --summary -i 2>/dev/nullaureport --user -i --summary 2>/dev/null# 查看SELinux审计(如启用)ausearch -m avc,user_avc,selinux_err -ts today 2>/dev/null | head -10

3.2 日志管理与保护

# Gentoo使用metalog、syslog-ng或rsyslogqlist -I metalog syslog-ng rsyslog 2>/dev/null# 查看metalog配置(Gentoo默认)cat /etc/metalog/metalog.conf 2>/dev/null | head -30# 查看syslog-ng配置cat /etc/syslog-ng/syslog-ng.conf 2>/dev/null | grep -v '^#' | grep -v '^$' | head -20# 查看远程日志转发grep '@' /etc/syslog-ng/syslog-ng.conf /etc/metalog/metalog.conf 2>/dev/null# 查看journald配置(systemd profile)cat /etc/systemd/journald.conf 2>/dev/null | grep -v '^#' | grep -v '^$'# 查看日志持久化grep Storage /etc/systemd/journald.conf 2>/dev/null  # 应为persistent# 查看日志磁盘使用journalctl --disk-usage 2>/dev/null || echo "journalctl不可用"# 查看日志权限ls -la /var/log/ | head -15# Gentoo特有:检查是否启用logrotateqlist -I logrotate 2>/dev/nullcat /etc/logrotate.conf 2>/dev/null | head -10ls /etc/logrotate.d/ 2>/dev/null | head -10

四、入侵防范(8.1.4.4)

4.1 最小化安装与漏洞修复

控制项
测评命令
达标判据
待更新包
emerge -puv @world 2>/dev/null | grep -c 'ebuild'
及时更新安全补丁
GLSA检查
glsa-check -l all 2>/dev/null | grep -c 'Vulnerable'
0漏洞
服务最小化
rc-status --all 2>/dev/null | grep -c '\[started\]'
仅业务所需
监听端口
ss -tulnp | grep LISTEN
无高危端口(111, 23, 513等)

Gentoo特有配置:

# 查看可更新包(Portage特有)emerge -puv @world 2>/dev/null | head -20# 检查GLSA(Gentoo Linux Security Advisories)glsa-check -l all 2>/dev/null | head -20glsa-check -t all 2>/dev/null | head -10  # 测试修复glsa-check -f all 2>/dev/null | head -10  # 自动修复# 查看已安装包数量qlist -I 2>/dev/null | wc -l# 查看world文件(显式安装的包)cat /var/lib/portage/world | wc -lcat /var/lib/portage/world# 检查不必要的服务(OpenRC)rc-status --all 2>/dev/null | grep '\[started\]'rc-update show --all 2>/dev/null | grep '| default'# 或systemdsystemctl list-unit-files --state=enabled 2>/dev/null | grep -vE 'ssh|audit|syslog|cron|systemd' | head -20# 检查高危端口ss -tulnp | grep LISTEN | grep -E ':23|:111|:513|:514|:2049'# Gentoo特有:检查USE标志最小化grep 'USE' /etc/portage/make.conf | head -5diff -u <(cat /var/lib/portage/world) <(qlist -I 2>/dev/null) | head -20  # 查看依赖引入的包

4.2 防火墙与网络防护

# Gentoo防火墙方案:iptables/nftables/firewalld/ufw# 检查iptables(传统)iptables -L -n -v | head -20cat /etc/iptables/rules.v4 2>/dev/null || cat /etc/sysconfig/iptables 2>/dev/null# 检查nftables(现代推荐)nft list ruleset 2>/dev/null | head -30cat /etc/nftables.conf 2>/dev/null# 检查firewalldfirewall-cmd --state 2>/dev/nullfirewall-cmd --list-all 2>/dev/null# 检查ufwufw status verbose 2>/dev/null# Gentoo特有:检查是否通过package.use选择防火墙后端grep -r 'iptables\|nftables\|firewalld' /etc/portage/package.use/ /etc/portage/make.conf 2>/dev/null | head -5# 查看TCP Wrapper配置cat /etc/hosts.allowcat /etc/hosts.deny# 检查fail2ban(入侵防御)rc-status fail2ban 2>/dev/null || systemctl status fail2ban 2>/dev/nullfail2ban-client status 2>/dev/nullfail2ban-client status sshd 2>/dev/null# 检查网络内核参数(Gentoo可深度定制)sysctl -a 2>/dev/null | grep -E 'icmp_echo_ignore_all|rp_filter|syncookies' | head -10cat /etc/sysctl.conf 2>/dev/null | grep -v '^#' | head -10

4.3 编译时安全加固(Gentoo核心特色)

# 检查 hardened toolchaingcc -v 2>&1 | grep -i 'hardened\|specs'# 检查PIE(位置无关可执行文件)grep 'fPIE\|pie' /etc/portage/make.conf 2>/dev/nullreadelf -h /bin/ls 2>/dev/null | grep 'Type:'  # 应为DYN (Shared object file)# 检查SSP(栈保护)grep 'fstack-protector' /etc/portage/make.conf 2>/dev/nullreadelf -s /bin/ls 2>/dev/null | grep '__stack_chk_fail'# 检查Fortify Sourcegrep 'D_FORTIFY_SOURCE' /etc/portage/make.conf 2>/dev/nullreadelf -s /bin/ls 2>/dev/null | grep '__*_chk'# 检查RELRO和BIND_NOWreadelf -d /bin/ls 2>/dev/null | grep -E 'BIND_NOW|FLAGS_1'readelf -l /bin/ls 2>/dev/null | grep -E 'GNU_RELRO'# 检查CFI(控制流完整性,Clang特有)grep 'fsanitize=cfi' /etc/portage/make.conf 2>/dev/null# 查看当前profile的安全特性eselect profile showportageq envvar CFLAGS CXXFLAGS LDFLAGS 2>/dev/null | grep -E 'fstack|fPIE|D_FORTIFY|Wl,-z,relro|Wl,-z,now'# 检查是否启用Scudo或jemalloc(安全内存分配器)qlist -I scudo 2>/dev/nullqlist -I jemalloc 2>/dev/null

五、恶意代码防范(8.1.4.5)

控制项
测评命令
达标判据
ClamAV安装
qlist -I clamav 2>/dev/null
已安装
ClamAV状态
rc-status clamd 2>/dev/null || systemctl is-active clamd
active
病毒库更新
freshclam --version 2>/dev/null
24小时内更新
实时扫描
rc-status clamav-daemon 2>/dev/null
active(如安装)

Gentoo特有配置:

# 检查ClamAV安装qlist -I clamav 2>/dev/null || emerge -pv clamav 2>/dev/null | head -3# 查看ClamAV服务(OpenRC)rc-status clamd 2>/dev/nullrc-status freshclam 2>/dev/null# 或systemdsystemctl is-active clamd 2>/dev/nullsystemctl is-active freshclam 2>/dev/null# 手动更新病毒库sudo freshclam# 查看病毒库版本freshclam --version 2>/dev/null# 查看ClamScan计划任务cat /etc/cron.d/clamav 2>/dev/nullcrontab -l 2>/dev/null | grep clam# 检查Rootkit Hunterqlist -I rkhunter 2>/dev/null || emerge -pv rkhunter 2>/dev/null | head -3sudo rkhunter --check --sk 2>/dev/null | tail -20# 检查 chkrootkitqlist -I chkrootkit 2>/dev/null# Gentoo特有:检查mtree(文件完整性,Gentoo原生支持)qlist -I mtree 2>/dev/nullcat /etc/mtree/ 2>/dev/null | head -5# 检查AIDE(高级入侵检测环境)qlist -I aide 2>/dev/nullcat /etc/aide/aide.conf 2>/dev/null | head -20

六、可信验证(8.1.4.6)

控制项
测评命令
达标判据
TPM状态
dmesg | grep -i tpm
TPM 2.0就绪
Secure Boot
mokutil --sb-state 2>/dev/null
SecureBoot enabled
内核模块签名
cat /proc/sys/kernel/modules_disabled
模块签名验证
文件完整性
qcheck -e 2>/dev/null | head -20
无关键文件被篡改

Gentoo特有配置:

# 查看TPM状态dmesg | grep -i "tpm\|trusted platform"ls /dev/tpm* 2>/dev/null# 查看Secure Boot状态mokutil --sb-state 2>/dev/null || echo "mokutil未安装或Secure Boot未启用"# 查看内核安全启动cat /proc/sys/kernel/secure_boot 2>/dev/null# 查看内核模块签名modinfo $(lsmod | awk 'NR==2{print $1}') 2>/dev/null | grep sig# Gentoo特有:使用qcheck验证包完整性(Portage原生)qcheck -e vim 2>/dev/null | head -10  # 检查特定包qcheck -e 2>/dev/null | head -20       # 检查所有包# 使用qfile查找文件归属qfile /bin/ls 2>/dev/null# 检查内核配置安全选项grep -E 'CONFIG_SECURITY|CONFIG_INTEGRITY|CONFIG_IMA|CONFIG_EVM' /boot/config-$(uname -r) 2>/dev/null | head -20# 检查IMA/EVM(完整性度量架构)cat /sys/kernel/security/ima/ascii_runtime_measurements 2>/dev/null | head -5# 安装并运行Lynis安全扫描qlist -I lynis 2>/dev/null || emerge -pv lynis 2>/dev/null | head -3sudo lynis audit system --quick 2>/dev/null | grep -E 'Warning|Suggestion' | head -20

七、数据备份与恢复(8.1.4.9)

控制项
测评命令
达标判据
备份策略
cat /etc/cron.d/backup 2>/dev/null | grep -i backup
每日/每周任务
备份工具
qlist -I | grep -E 'backup|bacula|amanda|restic|borg'
已安装备份工具
备份目录权限
stat -c '%a %U:%G' /backup
700 root:root
恢复验证
tar -tzf /backup/etc-$(date +%F).tar.gz | wc -l
可正常解压

Gentoo特有配置:

# 查看备份工具qlist -I | grep -E 'backup|rsnapshot|bacula|amanda|restic|borg|duplicity' | head -10# 查看Timeshift(Gentoo可用)qlist -I timeshift 2>/dev/nullsudo timeshift --list 2>/dev/null | head -10# 查看Déjà Dup(GNOME)qlist -I deja-dup 2>/dev/null# 查看Rsync备份任务crontab -l 2>/dev/null | grep rsynccat /etc/cron.d/*backup* 2>/dev/null | head -10# 查看Restic备份(现代工具)restic snapshots -r /backup/restic 2>/dev/null | head -5# 查看Borg备份borg list /backup/borg 2>/dev/null | head -5# 验证备份完整性sudo tar -tzf /backup/etc-$(date +%F).tar.gz 2>/dev/null | wc -l# Gentoo特有:检查是否备份Portage重要文件ls -la /backup/portage/ 2>/dev/null | head -5# 应备份:/etc/portage/, /var/lib/portage/world, /var/db/repos/# 检查binpkg备份(Gentoo二进制包)ls -la /var/cache/binpkgs/ 2>/dev/null | head -5

八、Gentoo特有安全功能

8.1 Hardened Profile(安全强化配置文件)

# 查看当前profileeselect profile listeselect profile show# 推荐安全profile# default/linux/amd64/17.1/hardened# default/linux/amd64/17.1/hardened/selinux# default/linux/amd64/17.1/musl# default/linux/amd64/17.1/systemd# 切换hardened profile(需重新编译整个系统)# eselect profile set X# 检查hardened状态hardened-check 2>/dev/null || echo "hardened-check未安装"# 查看安全相关的USE标志portageq envvar USE 2>/dev/null | tr ' ' '\n' | grep -E 'hardened|pic|pie|ssp|selinux|pax|grsec|caps|xattr'

8.2 Portage安全特性

# 检查是否启用GPG签名验证grep 'FEATURES.*sign' /etc/portage/make.conf 2>/dev/nullgrep 'PORTAGE_GPG_DIR' /etc/portage/make.conf 2>/dev/null# 检查Manifest验证grep 'FEATURES.*strict' /etc/portage/make.conf 2>/dev/null# 检查是否启用沙盒编译grep 'FEATURES.*sandbox\|FEATURES.*usersandbox' /etc/portage/make.conf 2>/dev/null# 检查网络沙盒grep 'FEATURES.*network-sandbox' /etc/portage/make.conf 2>/dev/null# 查看编译隔离(PID命名空间)grep 'FEATURES.*pid-sandbox' /etc/portage/make.conf 2>/dev/null# 检查是否启用binpkg GPG签名grep 'BINPKG_FORMAT' /etc/portage/make.conf 2>/dev/null

8.3 内核安全(自定义编译优势)

# Gentoo内核安全选项检查脚本check_kernel_security() {    local config="/boot/config-$(uname -r)"    echo "=== 内核安全选项检查 ==="    echo "Stack Protector: $(grep CONFIG_CC_STACKPROTECTOR $config 2>/dev/null)"    echo "SLUB Debug: $(grep CONFIG_SLUB_DEBUG $config 2>/dev/null)"    echo "KASLR: $(grep CONFIG_RANDOMIZE_BASE $config 2>/dev/null)"    echo "SMEP/SMAP: $(grep -E 'CONFIG_X86_S(MEP|MAP)' $config 2>/dev/null)"    echo "KPTI: $(grep CONFIG_PAGE_TABLE_ISOLATION $config 2>/dev/null || grep CONFIG_KPTI $config 2>/dev/null)"    echo "Retpoline: $(grep CONFIG_RETPOLINE $config 2>/dev/null)"    echo "Livepatch: $(grep CONFIG_LIVEPATCH $config 2>/dev/null)"    echo "BPF JIT: $(grep CONFIG_BPF_JIT $config 2>/dev/null)"    echo "User Namespaces: $(grep CONFIG_USER_NS $config 2>/dev/null)"}check_kernel_security

一键巡检脚本(Gentoo Linux)

#!/bin/bash# Gentoo Linux 等保三级一键巡检脚本# 适用:Gentoo (amd64, OpenRC/systemd, hardened可选)# 执行用户:rootecho"===== Gentoo Linux 等保巡检报告 ====="echo"巡检时间: $(date'+%Y-%m-%d %H:%M:%S')"echo"服务器: $(hostname)"echo"Profile: $(eselect profile show 2>/dev/null |grep'default'||echo'Unknown')"echo"Init: $(cat /proc/1/comm 2>/dev/null)"echo""echo"===== 1 身份鉴别 ====="echo"--- 空口令检查 ---"awk -F: '$2==""{print "空口令用户: "$1}' /etc/shadowecho"--- 密码锁定账户 ---"awk -F: '$2~"^!"{print "锁定用户: "$1}' /etc/shadow |head-5echo"--- 密码有效期 ---"grep-E'PASS_MAX_DAYS|PASS_MIN_DAYS|PASS_WARN_AGE' /etc/login.defs 2>/dev/null |head-3echo"--- 密码复杂度 ---"cat /etc/pam.d/system-auth 2>/dev/null |grep pam_pwquality |head-3cat /etc/security/pwquality.conf 2>/dev/null |grep-E'minlen|minclass'|head-3echo"--- 登录失败锁定 ---"cat /etc/pam.d/system-auth 2>/dev/null |grep faillockcat /etc/security/faillock.conf 2>/dev/null |grep-v'^#'|grep-v'^$'|head-5echo"--- SSH配置 ---"grep-E'PermitRootLogin|Protocol|PasswordAuthentication|ClientAlive' /etc/ssh/sshd_config 2>/dev/null |head-5echo"--- 2FA检查 ---"qlist -I google-authenticator 2>/dev/null &&echo"Google Authenticator: 已安装"||echo"Google Authenticator: 未安装"echo""echo"===== 2 访问控制 ====="echo"--- 系统账户 ---"awk -F: '$3<1000 && $1!="root"{print "系统账户: "$1}' /etc/passwd |head-10echo"--- sudo配置 ---"grep'%wheel' /etc/sudoers 2>/dev/null |head-3ls-la /etc/sudoers.d/ 2>/dev/null |head-3echo"--- 关键文件权限 ---"stat-c'%a %n' /etc/passwd /etc/shadow /etc/group /etc/gshadow 2>/dev/nullecho"--- SELinux/Grsecurity ---"sestatus 2>/dev/null |head-3||echo"SELinux未启用"eselect profile show 2>/dev/null |grep hardened &&echo"Hardened profile: 是"||echo"Hardened profile: 否"echo""echo"===== 3 安全审计 ====="echo"--- auditd状态 ---"if["$(cat /proc/1/comm 2>/dev/null)"="systemd"];then    systemctl is-active auditd 2>/dev/null && systemctl is-enabled auditd 2>/dev/nullelse    rc-status auditd 2>/dev/null |head-3fiecho"--- 审计规则数量 ---"auditctl -l2>/dev/null |wc-l|xargs-I{}echo"审计规则数: {}"echo"--- 日志配置 ---"if[-f"/etc/metalog/metalog.conf"];thenecho"使用metalog"elif[-f"/etc/syslog-ng/syslog-ng.conf"];thenecho"使用syslog-ng"elif[-f"/etc/systemd/journald.conf"];thencat /etc/systemd/journald.conf 2>/dev/null |grep-v'^#'|grep-v'^$'|head-5fiecho""echo"===== 4 入侵防范 ====="echo"--- 待更新包 ---"emerge -puv @world 2>/dev/null |grep-c'ebuild'|xargs-I{}echo"可更新包数: {}"echo"--- GLSA漏洞 ---"glsa-check -l all 2>/dev/null |grep-c'Vulnerable'|xargs-I{}echo"GLSA漏洞数: {}"echo"--- 高危端口 ---"ss -tulnp2>/dev/null |grep-E'0.0.0.0:23|0.0.0.0:111|0.0.0.0:513'||echo"无高危端口暴露"echo"--- 防火墙状态 ---"ifcommand-v nft >/dev/null 2>&1;then    nft list ruleset 2>/dev/null |head-5&&echo"nftables: 启用"elifcommand-v iptables >/dev/null 2>&1;then    iptables -L-n2>/dev/null |head-3&&echo"iptables: 启用"elseecho"防火墙: 未配置"fiecho"--- 编译安全加固 ---"portageq envvar CFLAGS 2>/dev/null |grep-o'\-fstack-protector\|\-fPIE\|\-D_FORTIFY'|head-3echo""echo"===== 5 恶意代码防范 ====="echo"--- ClamAV安装 ---"qlist -I clamav 2>/dev/null |head-3echo"--- ClamAV服务 ---"if["$(cat /proc/1/comm 2>/dev/null)"="systemd"];then    systemctl is-active clamd 2>/dev/null ||echo"clamd未运行"else    rc-status clamd 2>/dev/null |head-1||echo"clamd未配置"fiecho"--- Rootkit检查 ---"qlist -I rkhunter 2>/dev/null &&echo"rkhunter: 已安装"||echo"rkhunter: 未安装"echo""echo"===== 6 可信验证 ====="echo"--- TPM状态 ---"dmesg2>/dev/null |grep-i"tpm"|head-3echo"--- Secure Boot ---"mokutil --sb-state 2>/dev/null ||echo"无法检测Secure Boot"echo"--- Portage完整性 ---"qcheck -e2>/dev/null |grep-c'missing'|xargs-I{}echo"缺失文件数: {}"echo"--- 内核安全选项 ---"grep-c'CONFIG_CC_STACKPROTECTOR=y' /boot/config-$(uname-r)2>/dev/null |xargs-I{}echo"栈保护: {}"echo""echo"===== 7 数据备份 ====="echo"--- 备份任务 ---"crontab-l2>/dev/null |grep-i backup ||echo"未配置crontab备份"ls /etc/cron.d/*backup* 2>/dev/null |head-3||echo"未找到备份cron任务"echo"--- 备份目录 ---"stat-c'%a %U:%G' /backup 2>/dev/null ||echo"备份目录不存在"echo"--- Portage备份 ---"ls /backup/portage/ 2>/dev/null |head-3||echo"Portage备份目录不存在"echo""echo"===== 8 Gentoo特有功能 ====="echo"--- Profile信息 ---"eselect profile show 2>/dev/nullecho"--- 安全USE标志 ---"portageq envvar USE 2>/dev/null |tr' ''\n'|grep-E'hardened|selinux|pax'|head-5echo"--- 沙盒特性 ---"grep'FEATURES' /etc/portage/make.conf 2>/dev/null |grep-o'sandbox\|usersandbox\|network-sandbox'|head-3echo""echo"===== 巡检完成 ====="

高风险项重点核查清单

检查项
验证命令
不合规判定
整改建议
空口令账户awk -F: '$2==""{print $1}' /etc/shadow
存在输出
立即设置强口令或锁定
密码复杂度未启用cat /etc/pam.d/system-auth | grep pam_pwquality
无输出
安装libpwquality并配置
无登录失败锁定cat /etc/pam.d/system-auth | grep faillock
无输出
配置pam_faillock
root远程登录grep ^PermitRootLogin /etc/ssh/sshd_config
值为yes
修改为no
非hardened profileeselect profile show | grep hardened
无输出
切换至hardened profile
审计未启用rc-status auditd
 或 systemctl is-active auditd
非active
安装并启用auditd
GLSA漏洞未修复glsa-check -l all | grep Vulnerable
存在漏洞
执行glsa-check -f all
无防火墙nft list ruleset
 / iptables -L
无规则
配置nftables或iptables
编译时无安全加固portageq envvar CFLAGS
无-fstack-protector等
在make.conf添加安全标志
未启用沙盒grep FEATURES /etc/portage/make.conf
无sandbox
添加FEATURES="sandbox usersandbox"
备份未配置crontab -l | grep backup
无输出
配置定时备份任务

Gentoo Linux版本差异对照

对比项
Gentoo (OpenRC)
Gentoo (systemd)
Gentoo (musl)
初始化系统
OpenRC
systemd
OpenRC/systemd
C库
glibc
glibc
musl
安全特性
hardened可选
hardened可选
默认安全优化
二进制兼容性
完整
完整
部分限制
编译速度
标准
标准
更快
内存占用
标准
标准
更低
等保合规
需配置
需配置
基础安全
推荐使用
服务器传统选择
现代化管理
嵌入式/容器

测评执行要点

1. 权限要求

  • 所有命令需 root 权限执行

  • 部分命令需要Portage环境(emergeqlist等)

2. 现场核查重点

  • Profile选择:确认是否使用hardened profile,这是Gentoo安全的核心

  • 编译安全:检查CFLAGS/CXXFLAGS是否包含栈保护、PIE、Fortify Source等

  • 沙盒编译:确认FEATURES包含sandbox,确保编译过程隔离

  • GLSA漏洞:Gentoo特有的安全公告系统,必须及时修复

  • 内核定制:利用Gentoo内核定制优势,启用KASLR、SMEP/SMAP等硬件防护

3. 版本差异注意

  • OpenRC vs systemd:服务管理命令不同,但安全机制一致

  • glibc vs musl:musl profile默认更安全但部分软件兼容性需注意

  • hardened profile:会强制启用PIE、SSP、RELRO等,但编译时间更长


常用命令速查

# Portage包管理emerge -s package          # 搜索包emerge -pv package         # 预览安装emerge package             # 安装包emerge -uDN @world         # 更新系统emerge --depclean# 清理依赖qlist -I package           # 检查是否安装qfile /path/to/file        # 查找文件归属包qcheck package             # 验证包完整性# 服务管理(OpenRC)rc-status                  # 查看服务状态rc-service service start   # 启动服务rc-update addservice default  # 开机自启rc-update del service default  # 取消自启# 服务管理(systemd)systemctl status servicesystemctl start servicesystemctl enableservice# Profile管理eselect profile list       # 列出可用profileeselect profile show       # 显示当前profileeselect profile set X      # 切换profile# 安全工具glsa-check -l all          # 列出所有GLSAglsa-check -t all          # 测试修复glsa-check -f all          # 应用修复hardened-check             # 检查hardened状态(如安装)# 编译相关portageq envvar CFLAGS     # 查看CFLAGSemerge -e @world           # 重新编译整个系统(切换profile后)make -j$(nproc)# 并行编译# 内核管理eselect kernel list        # 列出可用内核make menuconfig            # 配置内核make&&make modules_install &&makeinstall# 编译安装内核# 日志查看tail-f /var/log/messages  # metalogjournalctl -f# systemddmesg|tail# 内核消息

参考标准:GB/T 22239-2019、GB/T 28448-2019、Gentoo Security Guide、CIS Gentoo Benchmark、Gentoo Hardened Project

适用版本:Gentoo Linux (amd64/x86_64, OpenRC/systemd, glibc/musl)

验证环境:Stage3 / Hardened / SELinux / 自定义内核配置

汪汪虚拟空间

10个内容

等保测评命令——PostgreSQL数据库
2026-02-11
等保测评命令——Oracle数据库
2026-02-12
等保测评命令——OceanBase数据库
2026-02-13
等保测评命令——华为 GaussDB 系列
2026-02-14
等保测评命令——MySQL数据库
2026-02-21
等保测评命令——DB2数据库
2026-02-22
等保测评命令——华为网络设备
2026-02-23
等保测评命令——锐捷网络设备
2026-02-24
等保测评命令——华三(H3C)网络设备
2026-02-25
等保测评命令——思科网络设备
2026-02-26

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-03-27 10:07:14 HTTP/2.0 GET : https://f.mffb.com.cn/a/480621.html
  2. 运行时间 : 0.188439s [ 吞吐率:5.31req/s ] 内存消耗:4,922.77kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=be6813e1395a7923d2d792b8885821e1
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000797s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000942s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000343s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000256s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000676s ]
  6. SELECT * FROM `set` [ RunTime:0.000266s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000750s ]
  8. SELECT * FROM `article` WHERE `id` = 480621 LIMIT 1 [ RunTime:0.014545s ]
  9. UPDATE `article` SET `lasttime` = 1774577234 WHERE `id` = 480621 [ RunTime:0.011267s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 67 LIMIT 1 [ RunTime:0.000442s ]
  11. SELECT * FROM `article` WHERE `id` < 480621 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.001267s ]
  12. SELECT * FROM `article` WHERE `id` > 480621 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000417s ]
  13. SELECT * FROM `article` WHERE `id` < 480621 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002601s ]
  14. SELECT * FROM `article` WHERE `id` < 480621 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001593s ]
  15. SELECT * FROM `article` WHERE `id` < 480621 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.007324s ]
0.192565s