分类 安全/漏洞 articles

linux 让ssh只允许指定的用户登录

如何让ssh只允许指定的用户登录 方法1:在/etc/pam.d/sshd文件第一行加入 1auth required pam_listfile.so item=user sense=allow file=/etc/sshusers onerr=fail 然后在/etc下建立sshusers文件,编辑这个文件,加入你允许使用ssh服务的用户名,不用重新启动sshd服务。添加2个用户 1zhangsan 2lisisi 方法2:pam规则也可以写成deny的 1auth required pam_listfile.so item=user sense=deny……

Continue reading

linux pam模块篇(1)_pam_tally2模块

PAM(Pluggable Authentication Modules )是由Sun提出的一种认证机制。它通过提供一些动态链接库和一套统一的API,将系统提供的服务 和该服务的认证方式分开,使得系统管理员可以灵活地根据需要给不同的服务配置不同的认证方式而无需更改服务程序,同时也便于向系 统中添加新的认证手段。从本篇开始会总结……

Continue reading

AppArmor与SELinux

昨天写了一篇 linux内核强制访问控制--Apparmor ,今天趁着热呼劲没过,再加来一篇与 SELinux的对比篇。AppArmor 最初由 Immunix 开发,随后由 Novell 维护,它是 SELinux 的替代方法,也使用了 Linux 安全模块(LSM)框架。由于 SELinux 和 AppArmor 使用了同样的框架,所以它们可以互换。AppArmor 的开发……

Continue reading

编写变态的PHP后门

在这篇文章中,我将向大家介绍如何编写一个非字母数字的PHP后门。在编写这种PHP后门的时候,我们首先需要了解一些基础知识: (1)了解PHP (2)了解curl或者其他一些能够操作HTTP请求的工具 还有一点需要大家了解的是PHP中异或(^)的概念。对于异或,大家肯定都有所了解,但是平……

Continue reading

PHP后门新玩法:一款猥琐的PHP后门分析

本文是在鲜果订阅里看到来自freebuf站点的内容,而该文的原出处来自于360博客 。虽然本人对php代码的了解挺皮毛,不过感觉该木马的思路非常有意思 。出于围观和膜拜精神,现将该文内容做下摘录,并根据360上分析的步骤操作了一次。 phpwebshell代码如下: 1<?php 2error_reporting(0); 3session_start(); 4header……

Continue reading

Linux服务器上PHP的10大安全配置实践

PHP被广泛用于各种Web开发。而当服务器端脚本配置错误时会出现各种问题。现今,大部分Web服务器是基于Linux环境下运行(比如:Ubuntu,Debian等)。本文例举了十大PHP最佳安全实践方式,能够让您轻松、安全配置PHP。 PHP安全性设置提示: 1DocumentRoot: /var/www/ 2Default Web server: Apache 3Default PHP configuration file: /etc/php.ini 4Default PHP……

Continue reading

Linux下批量校验文件md5值(find+diff)

为了安全需要,第一次部署完linux之后,生成对应目录文件的md5值,比如/sbin目录下的执行文件,如果部署的是网站程序文件,也可以第一时间生成md5值,以后每次改动都可以记录在案。这样的话,在怀疑被入侵的时候可以批量对比文件md5值,看是否被恶意修改过。 1、生成某个目录文件的……

Continue reading

Struts2曝高危漏洞 黑客可控制大量服务器

昨日,著名Java Web框架Struts官方再发高危安全漏洞补丁升级(最新版本为:2.3.15.1),升级修补了多个安全漏洞,其中包括一个远程任意代码的高危安全漏洞,这些漏洞可以影响到Struts 2.0.0 – Struts 2.3.15的所有版本。攻击者可以利用该漏洞,执行恶意Java代码,最终导致网……

Continue reading

linux下利用shell查找php木马

作为站长和运维人员必须要面临站点可能被黑的可能。而在linux下,可以通过简间的语句查找并纠出这些害群之马。下面以php站为例 。php站里的上传的木马一般也都是.php文件 。同其他的网页语言一样,直接可以通过文本工具查看内容。一般的php木马里面都包含特点的关键词或关键语句。 1、……

Continue reading

nginx服务器防sql注入与溢出(二)

上一篇——nginx服务器防sql注入与溢出(一) 列出了常用的进行注入与溢出的各种防止方法。但是上文列出的是普遍的方法,针对各自现网应用的不同,使用上也需要进行相应的调整。下面列出一下我现网中的防止方法。 一、自动防护 1if ($request_uri ~* .(htm|do)?(.*)$) { 2 set $req $2; 3} 4if ($req ~* "(cost()|(concat()") { 5 return 503; 6} 7if ($req ~* "union[+|(%20)]") { 8 return 503; 9} 10if ($req ~* "and[+|(%20)]")……

Continue reading

Latest articles

Categories

Tags

ACL AD AES AI AWS Ansible Atlassian Azure BMC Blockchain Brocade CDH5 CL210 Cobbler Confd C语言 DDOS DISTINCT DNS Duckdb EKS ELK GCP Ghost Git Glusterfs Go Godaddy Grafana HBA HCIE Hotspot HttpWatch IBM IIS IOS InfluxDB Ingress InnoDB JavaScript Jinja2 KVM Keepalived Mplayer MySQLdb Netlify OpenResty PM PostgreSQL QoS RH318 RH442 RHCA RHCE RHEV RSA SRE SecureCRT Statuscode SublimeText2 TC Telecom Tencentcloud VBA aira2 alpine android anpic apache apm apparmor appfog apr apt-get aria2 array atop audit awk awstats axel backdoor backup bamboo bash bat benchmark bigdata bin bind bitwise book bootstrap bsd c1000 cache capistrano catlog centos centos7 chatops chattr check_mk checkinstall cisco clearall clickhouse cloud-desktop cmdb cms collectd comm compress conver corosync cpu crontab crunchbang css curl date decode dell desktop devops df dhcp diff diskpart django docker dos2unix dpkg drupal etcd excel fail2ban fastcgi fdisk fiddler find firewalld flask flvtool ftp function fuser geek gin github gitlab glances golang google gooupadd graphviz gravatra grep grub2 hadoop haproxy hardware heartbeat helm hexdump hhvm history html http/html/web httplogs https huawei huaweicloud hugo icmp iconv ifconfig inotify iopp ipmitool iptables iredmail iscsi isito it-news java jdk jenkins jira join joomla k3s k8s kdump kernel kingate lamp last leetcode lib light-http linux linux高级篇 ln ls lsi lsof lvm lvs mac mail man mark markdown matplotlib maven memcached microservice mimikatz mkdocs mkpasswd mmonit mod_jk mongodb monit monitor mono moodle mosh mount mpm mrtg mtr my.cnf mysql mysqlbinlog mysqld_multi mysqldump mysqlhotcopy nagios nc nethogs nexus nfs nginx nmon nocatlog node.js nrpe ntfs ntop ntp obs ocr open-falcon openbox opencv openldap openssl openstack oracle oswatch paas pacemaker pam pandas parted pcp pcre pdf percona perl pexpect pgrep php php-fpm ping plsql develope postfix powershell prettify proc prometheus puppeteer pushd pwgen pxe pyecharts python python模块 radmin raid rdesktop read redhat redis redmine regex rh134 rhel7 rhel8 rm rman rootkit route rpm rpmforge rrdtool rsync rsyslog safe saltstack samba scapy screen sed selenium selinux seo seq session set shc sheepdog shell shopt sitemap skydns smokeping snffier snmp socket soft sort spider sql sqlserver squid ss ssh sshpass strace strings su sudo suse svn sysbench syslog-ng sysstat systemd t tar tcpcopy tcpdump tech telnet tengine test testlink threads time tmux tomcat touch tr tsar twisted ubuntu udev ulimit unix unixbench user-agent useradd varnish vbs vercel vi vim visudo vmstat vmware vnc voice vpn vscode vsftp vsftpd vue watchdog web webcam webistrano wget wiki windows wol wordpress workshop wsl x-windows xampp xcache xmllint xtrabackup yule yum zabbix zeromq zip zonetime zookeeper 下载工具 云主机 云原生 代理 加密 古意 吐槽 圈里圈外 娱乐 字符串函数 安全 平台架构 意林 推理 提权 故事汇 故障案例 数据结构 每日看点 民国史 生活 科学记录 站长管理工具 算法 管理 网站架构 翻墙 股票 行业 诗韵 负载均衡 远程管理 面试题

Links

Meta