Training: Crypto – Transposition I

Crypto – Transposition

Explain

It seems that the simple substitution ciphers are too easy for you.
From my own experience I can tell that transposition ciphers are more difficult to attack.
However, in this training challenge you should have not much problems to reveal the plaintext.


Ciphertext

oWdnreuf.lY uoc nar ae dht eemssga eaw yebttrew eh nht eelttre sra enic roertco drre . Ihtni koy uowlu dilekt  oes eoyrup sawsro don:wp ropglddpel.f

여러가지 암호화 기법이 있지만,
이를 복호화 하기 위해선 첨부된 http://en.wikipedia.org/wiki/Transposition_cipher에서 전위 암호의 정의를 보면,

In cryptography, a transposition cipher is a method of encryption by which the positions held by units of plaintext

전위 암호화는 단순히 글자들의 위치만을 바꾸어 쉽게 알아보게 하지 못하는 방식을 췽한다.

문제에 나온 암호화된 문장의 첫 시작인 “oWdnreuf.l”을 제조합 하면 Wonderful이 된는데,
2글자씩 위치가 변경(Transposition)되어 암호화 된 것이다. 즉, key가 ‘2’이라면 ‘2’글자씩 순서를 뒤바꾸는 형식인것이다.

이 방식을 역으로 이용해 거꾸로 key의 수씩 거꾸로 출력하하는 코드를 짜면 아래와 같다.

def decrypt(ciphertext, key):
    plainText = ""
    ciphertext= list(ciphertext)
    for _ in range( round(len(ciphertext)/key + 0.5) ):
        dump = ciphertext[:key]
        plainText += ''.join(dump[::-1])
        del ciphertext[:key]
    return plainText
            

ciphertext = "oWdnreuf.lY uoc nar ae dht eemssga eaw yebttrew eh nht eelttre sra enic roertco drre . Ihtni koy uowlu dilekt oes eoyrup sawsro don:wp ropglddpel.f"
key = 2

print(decrypt(ciphertext, key))

이 코드에 위에서 주어진 암호문을 넣고 실행 시키면,
Wonderful. You can read the message way better when the letters are in correct order. I think you would like to see your password now: porgpdlpdlef.
가 출력된다.

 

[WeChall]Training: MySQL II

[WeChall]Training: MySQL II[link]


문제

This one is the same as MySQL1, but you have to come up with a more advanced injection to trick this authentication.
Your mission is again: Login yourself as admin.
Again you are given the sourcecode, also as highlighted version.

번역

이것은 MySQL1과 동일하지만, 이 인증을 속이기 위해선 진보된 인젝션이 필요합니다.
당신의 임무는 쉽습니다: 관리자로 로그인하십시오.
그리고 소스 코드 와  하이라이트 버전으로 소스 코드가 제공됩니다.


Query

 $query = "SELECT * FROM users WHERE username='$username'";

Answer is Next page

[WeChall]Training: MySQL I

[WeChall]Training: MySQL I[link]


문제

This one is the classic mysql injection challenge.
Your mission is easy: Login yourself as admin.
Again you are given the sourcecode, also as highlighted version.

번역

이것은 고전적인 mysql 인젝션 챌린지입니다.
당신의 임무는 쉽습니다: 관리자로 로그인하십시오.
그리고 소스 코드 와  하이라이트 버전으로 소스 코드가 제공됩니다.


Query

$query = "SELECT * FROM users WHERE username='$username' AND password='$password'";

Answer is Next page

[WeChall]No Escape

[WeChall]No Escape[link]


문제

The small gizmore software company is expanding, and got contracted to create the new online votings for presidental election in 2012.
The current script is in alpha phase, and we`d like to know if it`s safe.
To prove me wrong you have to set the votecount for at least one of the candidates to 111. There is a reset at 100.
Again you are given the sourcecode, also as highlighted version.

번역

작은 gizmore 소프트웨어 회사가 2012 년에 대통령 선거를위한 새로운 온라인 투표를 만들기로 계약을 맺었습니다.
현재 스크립트는 알파 단계에 있으며 안전한지 알고 싶습니다.
안전하지 않다고 증명하기 위해 후보자 중 적어도 한 명이 111표여야 합니다.
다만, 100으로 재설정됩니다.
그리고 소스 코드 와  하이라이트 버전으로 소스 코드가 제공됩니다.


Query

$query = "UPDATE noescvotes SET `$who`=`$who`+1 WHERE id=1";

Answer is Next page