分类: 网络

网络环境,服务器架设

  • [转 仅供参考] SQL Server 2000的安全配置

    微软的SQL Server是一种广泛使用的数据库,很多电子商务网站、企业内部信息化平台等都是基于SQL Server上的,但是数据库的安全性还没有被人们更系统的安全性等同起来,多数管理员认为只要把网络和操作系统的安全搞好了,那么所有的应用程序也就安全了。大多数系统管理员对数据库不熟悉而数据库管理员有对安全问题关心太少,而且一些安全公司也忽略数据库安全,这就使数据库的安全问题更加严峻了。数据库系统中存在的安全漏洞和不当的配置通常会造成严重的后果,而且都难以发现。数据库应用程序通常同操作系统的最高管理员密切相关。广泛SQL Server数据库又是属于“端口”型的数据库,这就表示任何人都能够用分析工具试图连接到数据库上,从而绕过操作系统的安全机制,进而闯入系统、破坏和窃取数据资料,甚至破坏整个系统。

    这里,我们主要谈论有关SQL Server2000数据库的安全配置以及一些相关的安全和使用上的问题。 (更多…)

  • [转载]实现四台WEB服务器的负载均衡

    集群的概念容易和一些概念(SMP 、NUMA、MPP、分布处理)相混淆,其主要区别在资源被共享和复制的级别不同。它们是按SMP、NUMA、MPP、集群、分布处理从最紧密到最松散的排列。

    SMP(多处理系统):这种系统是在一台计算机里有多个CPU,CPU之间的地位是平等的,它们共享内存空间和I/O设备。其工作方法是由操作系统负责将任务分解成多个并发进程,然后让其在不同的CPU上运行。 (更多…)

  • Linux中文件的压缩与解压缩

    命令: compress
    格式: compress 选项 文件列表
    功能: 用Lempel-ziv压缩方法来压缩文件或压缩标准输入
    选项: -r 递归操作,如果指定目录变元,则压缩该目录及其子目录中的所有文件。
    -c 将压缩数据返回标准输出,而缺省情况下为压缩文件时将压缩数据返回文件。
    -v 显示每个文件夹的压缩百分比。
    解释: 在用compress压缩文件时,将在原文件名之后加上扩展名.Z。如果不指定文件,则压缩标准输入,其结果返回标准输出。
    实例: 目的:压缩/mnt/lgx/a1.doc文件
    命令:#compress /mnt/lgx/a1.doc
    结果:压缩后生成a1.doc.Z文件。

    命令: uncompress
    格式: uncompress 选项 文件列表
    功能: 解压缩用compress 程序压缩过的文件
    选项: -c 它将压缩数据发往标准输出而不是改写旧的压缩文件
    解释: 如果不指定文件,则解压缩标准输入。缺省-c时,为解压缩。
    实例: 目的:解压缩/mnt/lgx/a1.doc.Z
    命令:# uncompress /mnt/lgx/a1.doc.Z
    (更多…)

  • [转]黑客基础之DOS

    net use ipipc$ ” ” /user:” ” 建立IPC空链接
    net use ipipc$ “密码” /user:”用户名” 建立IPC非空链接
    net use h: ipc$ “密码” /user:”用户名” 直接登陆后映射对方C:到本地为

    H:
    net use h: ipc$ 登陆后映射对方C:到本地为H:
    net use ipipc$ /del 删除IPC链接
    net use h: /del 删除映射对方到本地的为H:的映射
    net user 用户名 密码 /add 建立用户
    net user guest /active:yes 激活guest用户
    net user 查看有哪些用户
    net user 帐户名 查看帐户的属性
    net localgroup administrators 用户名 /add 把“用户”添加到管理员中使其

    (更多…)

  • [原创]绕过网通路由限制,完美三机互联~

    网通采用了网上认证的方式,使宽带路由成为泡影,多机无法通过路由方式共享上网。那么如何才能突破呢,下面我来介绍一种三机互联的方法。
    需要的器材,五块网卡,两根交叉线(具体做法)见附,一根直通线

    器材准备好之后,我们将使用internet共享+多网卡桥接。首先,选一台电脑做为主机,在其中加入三块网卡,等三块网卡状态正常后我们将其中一块与猫连接(这里使用直通线连接),另外两块分别与其他两台电脑相连(使用交叉线,另外两台电脑上各插一块网卡)连通后在主机上通过控制面板里面的网络安装向导,选择与猫相连的那块网卡作为internet共享连接,同时将剩下的两块网卡桥接。 (更多…)

  • [转载]CC攻击的思路及防范方法

    适合读者:DDOS研究员、各大站长、网络管理员

    前置知识:ASP基本阅读能力

    蝴蝶:前段时间上海一家游戏娱乐公司的网站遭到了基于页面请求的DDOS分布式拒绝服务攻击,网站陷入完全瘫痪状态,并被黑客的匿名信勒索,金额高达10万元,而在勒索过程中,这群黑客还表示会对腾讯QQ等网站下手,随后QQ“服务器维护”几天。12月5号的时候,全球BitTorrent服务器也受到了很强烈的DDOS攻击,一度陷入瘫痪。而DDOS攻击中最流行的也是威力最大的就是基于页面的DDOS以及将这个攻击理论发挥得淋漓尽致的攻击工具CC,本文特邀CC作者和我们共同了解CC的相关攻击原理和防范方法,希望能让更多的朋友了解这样的攻击方式并能防范它。

    (更多…)

  • Windows 2003 防木马、硬盘安全设置功略

    特别提示:在win2000下面那套权限设置方案,在win2003并不适用,也就是为什么以前有那么多写关于2000下面权限设置,而我这里要在2003重新提出来的原因

    作者:MaxGO QQ:80539280
    前言,我们院作了一个web服务器是专门给大学各个社团所开,前些日子服务器上几乎所有的网站首页都被修改,同学中有人惊呼,哇噻!谁干的真牛叉,我晕~~~在我看来这是迟早要发生的事,而且入侵过程及其简单,没看服务器之前就想过只有两种可能性,一是有人把服务器密码泄露出去了;二是,通过网站本身的漏洞(呵呵,服务器是我配置的)但我没有进行iis具体权限的设置。我N年前就给老师反映过了,社团的那帮菜安全意识极差,只会用现成的东东,这样下去迟早会出问题,老师当时没听进去,我也就没管那么多了。[separator]出问题后,我仔细研究了日志文件和所上传文件的日期,发现有个海洋顶端2006在3月份就已经传至服务器,不过没有做任何改动,汗一个~~~大概是这位大哥忘了,前些日子又费劲心思找了半天的网站漏洞,我看了看,这位四川XX大学的仁兄喜欢夜间作业,而且是连夜,真是有hacker精神。好了,不废话了,先从他的入侵经过讲起:该仁兄是从放置在服务器上的其中的一个社团网站进入的,该网站采用的是动易的3.X版本,据我所了解,没有打补丁,上传也是打开的,我没猜错的话他就是通过动易的漏洞上传了木马(呵呵,他这里上传的是桂林老兵的站长助手),然后通站长助手找到了其他的网站目录,从而该服务器上的社团网站们进行修改。
    事后,老师说将FSO禁用掉就万事大吉,我看不然,更何况有许多站点没有FSO的支持就无法运行。
    那么,怎么做才能防止asp木马在您服务器上的恶意破坏?我查阅了n多资料后,总结了一个比较完善的解决方法。在这里,我以海洋顶端2006为例,来简单介绍一下怎样设置才能严防asp木马。
    我装了一台Windows2003企业版,未打sp1补丁。
    如下图所示:
    采用默认设置,将海洋顶端2006放至web目录下,运行海洋顶端木马如图可以看出,在系统默认设置下,所有的操作都可用,也就是只要入侵者通过某种途径取得了webshell,那么采用海洋顶端木马就可以修改和删除web服务器的里面的绝大部分文件,甚至提升权限。
    我们来看看海洋顶端都有一些什么操作,大家看第6,7,8,9项,通过他们就可以运行服务器上的程序和修改文件。FSO我们先不管,我们先来卸载WScript.Shell, Shell.application
    这两个组件。
    选开始—–运行
    regsvr32 /u WSHom.Ocx
    regsvr32 /u shell32.dll
    也可以设置为禁止guests用户组访问,然后将访问web目录的默认账户设为guests组
    cacls %systemroot%system32shell32.dll /e /d guests
    如果提示无法删除文件正在使用,请先停用iis删除相关进程,然后再进行删除
    当然还可以将这些组建改名,但要记得需要改两个地方。
    1.WScript.Shell组件修改方法
    HKEY_CLASSES_ROOTWScript.Shell

    HKEY_CLASSES_ROOTWScript.Shell.1
    改名为其它的名字,如:改为WScript.Shell_ChangeName或WScript.Shell.1_ChangeName
    自己以后调用的时候使用这个就可以正常调用此组件了
    也要将clsid值也改一下
    HKEY_CLASSES_ROOTWScript.ShellCLSID项目的值
    HKEY_CLASSES_ROOTWScript.Shell.1CLSID项目的值
    2.
    Shell.Application组件修改方法
    HKEY_CLASSES_ROOTShell.Application

    HKEY_CLASSES_ROOTShell.Application.1
    改名为其它的名字,如:改为Shell.Application_ChangeName或Shell.Application.1_ChangeName
    自己以后调用的时候使用这个就可以正常调用此组件了
    也要将clsid值也改一下
    HKEY_CLASSES_ROOTShell.ApplicationCLSID项目的值
    HKEY_CLASSES_ROOTShell.ApplicationCLSID项目的值
    这样,就可以防止木马文件调用这些组建了。
    为了进一步的安全,我们还可以把 %systemroot%system32 下的net.exe,cmd.exe,ftp.exe,tftp.exe,telnet.exe 等设为只允许administrator访问。
    磁盘权限
    提示:如果权限设置出错,可以采用微软的secedit 工具来恢复默认
    首先,将所有磁盘上的everyone用户去掉。系统盘其他用户保持默认,其他盘就留system和administrator就可以了,装有服务软件的文件夹具体权限还需另外设置。
    然后,给每个web站点一个默认匿名访问账户,同时给与其相对应的虚拟目录文件夹相应的权限。
    网上关于这方面的设置比较多,暂时借用天之骄子的。他的是在2000下设置的,这方面2003大体相同,但在,文件夹权限方面是不同的,切记切记~~~运行asp的默认权限,我会在附录中给出。
    我们给用户建一个本地目录,也就是用户的网站的根目录我们就建到F:8660.net

    到控制面版—-管理工具—服务器管理–本地用户或组—用户—-新增USER_8660.net的用户

    {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/@9zc_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/@9zc_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />
    选择USER_8660.net用户–属性—修改隶属于改成gusets组
    {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/jg_m_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/jg_m_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />
    给用户的文件夹F:8660.net分配权限(USER_8660.NET是控制改用户的来宾帐号 ASPNET 由于服务器上支持。NET所以也要把ASPNET帐户的权限给他,否则执行ASP。NET将权限不够)。
    {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/2yp6_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/2yp6_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />
    把USER_8660.NET 和ASPNET的帐号的权限都设置成如下(记住一定不要把完全控制的权限分配给用户)

    {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/@9zb_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/@9zb_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />
    然后我们建立IIS指向到该用户的目录
    打开IIS—新建 WEB站点—
    {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/li!o_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/li!o_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />
    [img] {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/da6h_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/da6h_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />[/img]
    选择WEB服务器(8660.NET)–属性— 目录安全性
    {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/li!o_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/li!o_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />
    —-匿名访问和验证控制—编辑
    {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/jg_m_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/jg_m_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />
    匿名访问—编辑
    {
    return imgzoom(this);
    }” onmouseover=”function anonymous()
    {
    if(this.resized) this.style.cursor=’hand’;
    }” onclick=”function anonymous()
    {
    if(!this.resized) {return true;} else {window.open(‘http://www.8660.net/blog/attachments/month_0506/3zr7_20056258439.jpg’);}
    }” src=”http://www.8660.net/blog/attachments/month_0506/3zr7_20056258439.jpg” onload=”function anonymous()
    {
    if(this.width>screen.width*0.7) {this.resized=true; this.width=screen.width*0.7; this.alt=’Click here to open new windownCTRL+Mouse wheel to zoom in/out’;}
    }” border=”0″ />
    选择USER_8660.NET用户名作为访问此站点的用户帐号

    至此,即使有人取得了一个网站的webshell,也只能对该网站进行修改(活该,谁叫你有洞),并不能造成跨站攻击了,呵呵~~~

    附录一:
    我们安装软件的权限设置:
    c:Program FilesLIWEIWENSOFT
    Everyone 读取和运行,列出文件夹目录,读取
    administrators 全部
    IIS_WPG 读取和运行,列出文件夹目录,读取

    c:Program FilesDimac(如果有这个目录)
    Everyone 读取和运行,列出文件夹目录,读取
    administrators 全部

    c:Program FilesComPlus Applications (如果有)
    administrators 全部

    c:Program FilesGflSDK (如果有)
    administrators 全部
    Creator owner
    不是继承的
    只有子文件夹及文件
    完全
    Power Users
    修改,读取和运行,列出文件夹目录,读取,写入
    system 全部
    TERMINAL SERVER Users
    修改,读取和运行,列出文件夹目录,读取,写入
    Users 读取和运行,列出文件夹目录,读取
    Everyone 读取和运行,列出文件夹目录,读取

    c:Program FilesInstallShield Installation Information (如果有)
    c:Program FilesInternet Explorer (如果有)
    c:Program FilesNetMeeting (如果有)
    administrators 全部

    附录二:
    IIS 6.0所需要的默认权限
    NTFS permissions
    Directory UsersGroups Permissions
    %windir%helpiishelpcommon Administrators Full control
    %windir%helpiishelpcommon System Full control
    %windir%helpiishelpcommon IIS_WPG Read
    %windir%helpiishelpcommon Users (See Note 1.) Read, execute
    %windir%IIS Temporary Compressed Files Administrators Full control
    %windir%IIS Temporary Compressed Files System Full control
    %windir%IIS Temporary Compressed Files IIS_WPG List, read, write
    %windir%IIS Temporary Compressed Files Creator owner Full control
    %windir%system32inetsrv Administrators Full control
    %windir%system32inetsrv System Full control
    %windir%system32inetsrv Users Read, execute
    %windir%system32inetsrv*.vbs Administrators Full control
    %windir%system32inetsrvASP compiled templates Administrators Full control
    %windir%system32inetsrvASP compiled templates IIS_WPG Read
    %windir%system32inetsrvHistory Administrators Full control
    %windir%system32inetsrvHistory System Full control
    %windir%system32Logfiles Administrators Full control
    %windir%system32inetsrvmetaback Administrators Full control
    %windir%system32inetsrvmetaback System Full control
    InetpubAdminscripts Administrators Full control
    Inetpubwwwroot (or content directories) Administrators Full control
    Inetpubwwwroot (or content directories) System Full control
    Inetpubwwwroot (or content directories) IIS_WPG Read, execute
    Inetpubwwwroot (or content directories) IUSR_MachineName Read, execute
    Inetpubwwwroot (or content directories) ASPNET (See Note 2.) Read, execute

    Note 1 You must have permissions to this directory when you use Basic authentication or Integrated authentication and when custom errors are configured. For example, when error 401.1 occurs, the logged-on user sees the expected detailed custom error only if permissions to read the 4011.htm file have been granted to that user.

    Note 2 By default, ASP.NET is used as the ASP.NET process identity in IIS 5.0 isolation mode. If ASP.NET is switched to IIS 5.0 isolation mode, ASP.NET must have access to the content areas. ASP.NET process isolation is detailed in IIS Help. For additional information, visit the following Microsoft Web site:

    ASP.NET process isolation
    http://www.microsoft.com/technet … technet/prodtechnol
    /windowsserver2003/proddocs/standard/aaconruntimeprocessisolation.asp

    Registry permissions
    Location UsersGroups Permissions
    HKLMSystemCurrentControlSetServiceASP Administrators Full control
    HKLMSystemCurrentControlSetServiceASP System Full control
    HKLMSystemCurrentControlSetServiceASP IIS_WPG Read
    HKLMSystemCurrentControlSetServiceHTTP Administrators Full control
    HKLMSystemCurrentControlSetServiceHTTP System Full control
    HKLMSystemCurrentControlSetServiceHTTP IIS_WPG Read
    HKLMSystemCurrentControlSetServiceIISAdmin Administrators Full control
    HKLMSystemCurrentControlSetServiceIISAdmin System Full control
    HKLMSystemCurrentControlSetServiceIISAdmin IIS_WPG Read
    HKLMSystemCurrentControlSetServicew3svc Administrators Full control
    HKLMSystemCurrentControlSetServicew3svc System Full control
    HKLMSystemCurrentControlSetServicew3svc IIS_WPG Rea
    ]]>