본문 바로가기
Cryptography

[HackCTF] Classic Cipher -4

by L3m0n S0ju 2021. 10. 6.

 

 

암호는 아래와 같습니다.

 

 

 

◆□ &↔↙■◀→○↔☆■●↙, ☆ 〓★#〓◀◆◀★◀◆→□ &◆■●§↔ ◆〓 ☆ ◎§◀●→@ →※ §□&↔↙■◀◆□○ #↙ ♩●◆&● ★□◆◀〓 →※ ■▼☆◆□◀§♪◀ ☆↔§ ↔§■▼☆&§@ ♩◆◀● &◆■●§↔◀§♪◀, ☆&&→↔@◆□○ ◀→ ☆ ※◆♪§@ 〓↙〓◀§◎; ◀●§ "★□◆◀〓" ◎☆↙ #§ 〓◆□○▼§ ▼§◀◀§↔〓 (◀●§ ◎→〓◀ &→◎◎→□), ■☆◆↔〓 →※ ▼§◀◀§↔〓, ◀↔◆■▼§◀〓 →※ ▼§◀◀§↔〓, ◎◆♪◀★↔§〓 →※ ◀●§ ☆#→♬§, ☆□@ 〓→ ※→↔◀●. ◀●§ ↔§&§◆♬§↔ @§&◆■●§↔〓 ◀●§ ◀§♪◀ #↙ ■§↔※→↔◎◆□○ ◀●§ ◆□♬§↔〓§ 〓★#〓◀◆◀★◀◆→□.

〓★#〓◀◆◀★◀◆→□ &◆■●§↔〓 &☆□ #§ &→◎■☆↔§@ ♩◆◀● ◀↔☆□〓■→〓◆◀◆→□ &◆■●§↔〓. ◆□ ☆ ◀↔☆□〓■→〓◆◀◆→□ &◆■●§↔, ◀●§ ★□◆◀〓 →※ ◀●§ ■▼☆◆□◀§♪◀ ☆↔§ ↔§☆↔↔☆□○§@ ◆□ ☆ @◆※※§↔§□◀ ☆□@ ★〓★☆▼▼↙ ↓★◆◀§ &→◎■▼§♪ →↔@§↔, #★◀ ◀●§ ★□◆◀〓 ◀●§◎〓§▼♬§〓 ☆↔§ ▼§※◀ ★□&●☆□○§@. #↙ &→□◀↔☆〓◀, ◆□ ☆ 〓★#〓◀◆◀★◀◆→□ &◆■●§↔, ◀●§ ★□◆◀〓 →※ ◀●§ ■▼☆◆□◀§♪◀ ☆↔§ ↔§◀☆◆□§@ ◆□ ◀●§ 〓☆◎§ 〓§↓★§□&§ ◆□ ◀●§ &◆■●§↔◀§♪◀, #★◀ ◀●§ ★□◆◀〓 ◀●§◎〓§▼♬§〓 ☆↔§ ☆▼◀§↔§@.

◀●§↔§ ☆↔§ ☆ □★◎#§↔ →※ @◆※※§↔§□◀ ◀↙■§〓 →※ 〓★#〓◀◆◀★◀◆→□ &◆■●§↔. ◆※ ◀●§ &◆■●§↔ →■§↔☆◀§〓 →□ 〓◆□○▼§ ▼§◀◀§↔〓, ◆◀ ◆〓 ◀§↔◎§@ ☆ 〓◆◎■▼§ 〓★#〓◀◆◀★◀◆→□ &◆■●§↔; ☆ &◆■●§↔ ◀●☆◀ →■§↔☆◀§〓 →□ ▼☆↔○§↔ ○↔→★■〓 →※ ▼§◀◀§↔〓 ◆〓 ◀§↔◎§@ ■→▼↙○↔☆■●◆&. ☆ ◎→□→☆▼■●☆#§◀◆& &◆■●§↔ ★〓§〓 ※◆♪§@ 〓★#〓◀◆◀★◀◆→□ →♬§↔ ◀●§ §□◀◆↔§ ◎§〓〓☆○§, ♩●§↔§☆〓 ☆ ■→▼↙☆▼■●☆#§◀◆& &◆■●§↔ ★〓§〓 ☆ □★◎#§↔ →※ 〓★#〓◀◆◀★◀◆→□〓 ☆◀ @◆※※§↔§□◀ ■→〓◆◀◆→□〓 ◆□ ◀●§ ◎§〓〓☆○§, ♩●§↔§ ☆ ★□◆◀ ※↔→◎ ◀●§ ■▼☆◆□◀§♪◀ ◆〓 ◎☆■■§@ ◀→ →□§ →※ 〓§♬§↔☆▼ ■→〓〓◆#◆▼◆◀◆§〓 ◆□ ◀●§ &◆■●§↔◀§♪◀ ☆□@ ♬◆&§ ♬§↔〓☆.

☆▼◀●→★○● ◀●§ ◀↔☆@◆◀◆→□☆▼ △§↙♩→↔@ ◎§◀●→@ ※→↔ &↔§☆◀◆□○ ☆ ◎◆♪§@ 〓★#〓◀◆◀★◀◆→□ ☆▼■●☆#§◀ ◆〓 〓◆◎■▼§, ☆ 〓§↔◆→★〓 @◆〓☆@♬☆□◀☆○§ ◆〓 ◀●☆◀ ◀●§ ▼☆〓◀ ▼§◀◀§↔〓 →※ ◀●§ ☆▼■●☆#§◀ (♩●◆&● ☆↔§ ◎→〓◀▼↙ ▼→♩ ※↔§↓★§□&↙) ◀§□@ ◀→ 〓◀☆↙ ☆◀ ◀●§ §□@. ☆ 〓◀↔→□○§↔ ♩☆↙ →※ &→□〓◀↔★&◀◆□○ ☆ ◎◆♪§@ ☆▼■●☆#§◀ ◆〓 ◀→ ■§↔※→↔◎ ☆ &→▼★◎□☆↔ ◀↔☆□〓■→〓◆◀◆→□ →□ ◀●§ →↔@◆□☆↔↙ ☆▼■●☆#§◀ ★〓◆□○ ◀●§ △§↙♩→↔@, #★◀ ◀●◆〓 ◆〓 □→◀ →※◀§□ @→□§.

☆▼◀●→★○● ◀●§ □★◎#§↔ →※ ■→〓〓◆#▼§ △§↙〓 ◆〓 ♬§↔↙ ▼☆↔○§, ◀●◆〓 &◆■●§↔ ◆〓 □→◀ ♬§↔↙ 〓◀↔→□○, ☆□@ ◆〓 §☆〓◆▼↙ #↔→△§□. ■↔→♬◆@§@ ◀●§ ◎§〓〓☆○§ ◆〓 →※ ↔§☆〓→□☆#▼§ ▼§□○◀● (〓§§ #§▼→♩), ◀●§ &↔↙■◀☆□☆▼↙〓◀ &☆□ @§@★&§ ◀●§ ■↔→#☆#▼§ ◎§☆□◆□○ →※ ◀●§ ◎→〓◀ &→◎◎→□ 〓↙◎#→▼〓 #↙ ☆□☆▼↙☎◆□○ ◀●§ ※↔§↓★§□&↙ @◆〓◀↔◆#★◀◆→□ →※ ◀●§ &◆■●§↔◀§♪◀. ◀●◆〓 ☆▼▼→♩〓 ※→↔◎☆◀◆→□ →※ ■☆↔◀◆☆▼ ♩→↔@〓, ♩●◆&● &☆□ #§ ◀§□◀☆◀◆♬§▼↙ ※◆▼▼§@ ◆□, ■↔→○↔§〓〓◆♬§▼↙ §♪■☆□@◆□○ ◀●§ (■☆↔◀◆☆▼) 〓→▼★◀◆→□ (〓§§ ※↔§↓★§□&↙ ☆□☆▼↙〓◆〓 ※→↔ ☆ @§◎→□〓◀↔☆◀◆→□ →※ ◀●◆〓). ◆□ 〓→◎§ &☆〓§〓, ★□@§↔▼↙◆□○ ♩→↔@〓 &☆□ ☆▼〓→ #§ @§◀§↔◎◆□§@ ※↔→◎ ◀●§ ■☆◀◀§↔□ →※ ◀●§◆↔ ▼§◀◀§↔〓; ※→↔ §♪☆◎■▼§, ☆◀◀↔☆&◀, →〓〓§→★〓, ☆□@ ♩→↔@〓 ♩◆◀● ◀●→〓§ ◀♩→ ☆〓 ◀●§ ↔→→◀ ☆↔§ ◀●§ →□▼↙ &→◎◎→□ §□○▼◆〓● ♩→↔@〓 ♩◆◀● ◀●§ ■☆◀◀§↔□ ☆##&☆@#. ◎☆□↙ ■§→■▼§ 〓→▼♬§ 〓★&● &◆■●§↔〓 ※→↔ ↔§&↔§☆◀◆→□, ☆〓 ♩◆◀● &↔↙■◀→○↔☆◎ ■★☎☎▼§〓 ◆□ ◀●§ □§♩〓■☆■§↔.

☆&&→↔@◆□○ ◀→ ◀●§ ★□◆&◆◀↙ @◆〓◀☆□&§ →※ §□○▼◆〓●, 27.6 ▼§◀◀§↔〓 →※ &◆■●§↔◀§♪◀ ☆↔§ ↔§↓★◆↔§@ ◀→ &↔☆&△ ☆ ◎◆♪§@ ☆▼■●☆#§◀ 〓◆◎■▼§ 〓★#〓◀◆◀★◀◆→□. ◆□ ■↔☆&◀◆&§, ◀↙■◆&☆▼▼↙ ☆#→★◀ 50 ▼§◀◀§↔〓 ☆↔§ □§§@§@, ☆▼◀●→★○● 〓→◎§ ◎§〓〓☆○§〓 &☆□ #§ #↔→△§□ ♩◆◀● ※§♩§↔ ◆※ ★□★〓★☆▼ ■☆◀◀§↔□〓 ☆↔§ ※→★□@. ◆□ →◀●§↔ &☆〓§〓, ◀●§ ■▼☆◆□◀§♪◀ &☆□ #§ &→□◀↔◆♬§@ ◀→ ●☆♬§ ☆ □§☆↔▼↙ ※▼☆◀ ※↔§↓★§□&↙ @◆〓◀↔◆#★◀◆→□, ☆□@ ◎★&● ▼→□○§↔ ■▼☆◆□◀§♪◀〓 ♩◆▼▼ ◀●§□ #§ ↔§↓★◆↔§@ #↙ ◀●§ &↔↙■◀☆□☆▼↙〓◀. ◀●§ ※▼☆○ ◆〓 ♩§▼&→◎§ ◀→ 〓◆◎■▼§ 〓★#〓◀◆◀★◀◆→□ &◆■●§↔!

 

 

 

 


ab cdefghidjfke, j mlnmgaglgahb cafkod am j sogkhq ht obcdefgabi ne pkack lbagm ht frjabgoug jdo dofrjcoq pagk cafkodgoug, jcchdqabi gh j tauoq memgos; gko "lbagm" sje no mabiro roggodm (gko shmg chsshb), fjadm ht roggodm, gdafrogm ht roggodm, saugldom ht gko jnhvo, jbq mh thdgk. gko docoavod qocafkodm gko goug ne fodthdsabi gko abvodmo mlnmgaglgahb.

mlnmgaglgahb cafkodm cjb no chsfjdoq pagk gdjbmfhmagahb cafkodm. ab j gdjbmfhmagahb cafkod, gko lbagm ht gko frjabgoug jdo dojddjbioq ab j qattodobg jbq lmljrre xlago chsfrou hdqod, nlg gko lbagm gkosmorvom jdo rotg lbckjbioq. ne chbgdjmg, ab j mlnmgaglgahb cafkod, gko lbagm ht gko frjabgoug jdo dogjaboq ab gko mjso moxlobco ab gko cafkodgoug, nlg gko lbagm gkosmorvom jdo jrgodoq.

gkodo jdo j blsnod ht qattodobg gefom ht mlnmgaglgahb cafkod. at gko cafkod hfodjgom hb mabiro roggodm, ag am godsoq j masfro mlnmgaglgahb cafkod; j cafkod gkjg hfodjgom hb rjdiod idhlfm ht roggodm am godsoq fhreidjfkac. j shbhjrfkjnogac cafkod lmom tauoq mlnmgaglgahb hvod gko obgado sommjio, pkodojm j fhrejrfkjnogac cafkod lmom j blsnod ht mlnmgaglgahbm jg qattodobg fhmagahbm ab gko sommjio, pkodo j lbag tdhs gko frjabgoug am sjffoq gh hbo ht movodjr fhmmanaragaom ab gko cafkodgoug jbq vaco vodmj.

jrgkhlik gko gdjqagahbjr woephdq sogkhq thd cdojgabi j sauoq mlnmgaglgahb jrfkjnog am masfro, j modahlm qamjqvjbgjio am gkjg gko rjmg roggodm ht gko jrfkjnog (pkack jdo shmgre rhp tdoxlobce) gobq gh mgje jg gko obq. j mgdhbiod pje ht chbmgdlcgabi j sauoq jrfkjnog am gh fodthds j chrlsbjd gdjbmfhmagahb hb gko hdqabjde jrfkjnog lmabi gko woephdq, nlg gkam am bhg htgob qhbo.

jrgkhlik gko blsnod ht fhmmanro woem am vode rjdio, gkam cafkod am bhg vode mgdhbi, jbq am ojmare ndhwob. fdhvaqoq gko sommjio am ht dojmhbjnro robigk (moo norhp), gko cdefgjbjremg cjb qoqlco gko fdhnjnro sojbabi ht gko shmg chsshb mesnhrm ne jbjrezabi gko tdoxlobce qamgdanlgahb ht gko cafkodgoug. gkam jrrhpm thdsjgahb ht fjdgajr phdqm, pkack cjb no gobgjgavore tarroq ab, fdhidommavore oufjbqabi gko (fjdgajr) mhrlgahb (moo tdoxlobce jbjremam thd j qoshbmgdjgahb ht gkam). ab mhso cjmom, lbqodreabi phdqm cjb jrmh no qogodsaboq tdhs gko fjggodb ht gkoad roggodm; thd oujsfro, jggdjcg, hmmohlm, jbq phdqm pagk gkhmo gph jm gko dhhg jdo gko hbre chsshb obiramk phdqm pagk gko fjggodb jnncjqn. sjbe fohfro mhrvo mlck cafkodm thd docdojgahb, jm pagk cdefghidjs flzzrom ab gko bopmfjfod.

jcchdqabi gh gko lbacage qamgjbco ht obiramk, 27.6 roggodm ht cafkodgoug jdo doxladoq gh cdjcw j sauoq jrfkjnog masfro mlnmgaglgahb. ab fdjcgaco, gefacjrre jnhlg 50 roggodm jdo booqoq, jrgkhlik mhso sommjiom cjb no ndhwob pagk topod at lblmljr fjggodbm jdo thlbq. ab hgkod cjmom, gko frjabgoug cjb no chbgdavoq gh kjvo j bojdre trjg tdoxlobce qamgdanlgahb, jbq slck rhbiod frjabgougm parr gkob no doxladoq ne gko cdefgjbjremg. gko trji am porchso gh masfro mlnmgaglgahb cafkod!

 

 

 

 


방법은 간단합니다. 위와 같이 특수문자 하나하나 알파벳으로 교환 후 치환 암호를 풀어주는 웹사이트에 입력하면 아래와 같은 글이 출력됩니다. 플래그도 있습니다.

 

 

 

 

 

 


in cryptography, a substitution cipher is a method of encrypting by which units of plaintext are replaced with ciphertext, according to a fixed system; the "units" may be single letters (the most common), pairs of letters, triplets of letters, mixtures of the above, and so forth. the receiver deciphers the text by performing the inverse substitution.

substitution ciphers can be compared with transposition ciphers. in a transposition cipher, the units of the plaintext are rearranged in a different and usually quite complex order, but the units themselves are left unchanged. by contrast, in a substitution cipher, the units of the plaintext are retained in the same sequence in the ciphertext, but the units themselves are altered.

there are a number of different types of substitution cipher. if the cipher operates on single letters, it is termed a simple substitution cipher; a cipher that operates on larger groups of letters is termed polygraphic. a monoalphabetic cipher uses fixed substitution over the entire message, whereas a polyalphabetic cipher uses a number of substitutions at different positions in the message, where a unit from the plaintext is mapped to one of several possibilities in the ciphertext and vice versa.

although the traditional keyword method for creating a mixed substitution alphabet is simple, a serious disadvantage is that the last letters of the alphabet (which are mostly low frequency) tend to stay at the end. a stronger way of constructing a mixed alphabet is to perform a columnar transposition on the ordinary alphabet using the keyword, but this is not often done.

although the number of possible keys is very large, this cipher is not very strong, and is easily broken. provided the message is of reasonable length (see below), the cryptanalyst can deduce the probable meaning of the most common symbols by analyzing the frequency distribution of the ciphertext. this allows formation of partial words, which can be tentatively filled in, progressively expanding the (partial) solution (see frequency analysis for a demonstration of this). in some cases, underlying words can also be determined from the pattern of their letters; for example, attract, osseous, and words with those two as the root are the only common english words with the pattern abbcadb. many people solve such ciphers for recreation, as with cryptogram puzzles in the newspaper.

according to the unicity distance of english, 27.6 letters of ciphertext are required to crack a mixed alphabet simple substitution. in practice, typically about 50 letters are needed, although some messages can be broken with fewer if unusual patterns are found. in other cases, the plaintext can be contrived to have a nearly flat frequency distribution, and much longer plaintexts will then be required by the cryptanalyst. the flag is welcome to simple substitution cipher!

 

 

 


플래그 -> HackCTF{welcome to simple substitution cipher!}

 

'Cryptography' 카테고리의 다른 글

[RSA 개념]  (0) 2021.10.12
[HackCTF] Classic Cipher -3  (0) 2021.10.09
[HackCTF] RSA2  (0) 2021.09.19
[HackCTF] RSA  (0) 2021.09.19
[암호학 개념]  (0) 2021.09.19

댓글