716 words
4 minutes
🔐 PicoGym - Waves Over Lambda

Description: We made a lot of substitutions to encrypt this. Can you decrypt it Difficulty: Medium
Author: invisibility/Danny

Summary#

This challenge provides a remote service that outputs a long ciphertext. The prompt hints that “a lot of substitutions” were used, strongly suggesting a monoalphabetic substitution cipher. The goal is to identify the substitution mapping and decrypt the full text to recover the flag.

Analysis#

A netcat service is given : nc fickle-tempest.picoctf.net 56322 Connecting to it returns the following ciphertext:

Terminal window
$ nc fickle-tempest.picoctf.net 56322
-------------------------------------------------------------------------------
qnaixvsd rhxh od enux fcvi - fxhguhaqe_od_q_nphx_cvtmjv_f3ff3v4j
-------------------------------------------------------------------------------
mhswhha ud srhxh wvd, vd o rvph vcxhvje dvoj dnthwrhxh, srh mnaj nf srh dhv. mhdojhd rncjoai nux rhvxsd snihsrhx srxnuir cnai yhxonjd nf dhyvxvsona, os rvj srh hffhqs nf tvkoai ud snchxvas nf hvqr nsrhx'd evxadvaj hpha qnapoqsonad. srh cvwehxsrh mhds nf ncj fhccnwdrvj, mhqvudh nf rod tvae ehvxd vaj tvae poxsuhd, srh nace qudrona na jhqk, vaj wvd ceoai na srh nace xui. srh vqqnuasvas rvj mxnuirs nus vcxhvje v mnb nf jntoanhd, vaj wvd sneoai vxqroshqsuxvcce wosr srh mnahd. tvxcnw dvs qxndd-chiihj xoirs vfs, chvaoai vivoads srh tozzha-tvds. rh rvj duakha qrhhkd, v ehccnw qntychbona, v dsxvoirs mvqk, va vdqhsoq vdyhqs, vaj, wosr rod vxtd jxnyyhj,
srh yvctd nf rvajd nuswvxjd, xhdhtmchj va ojnc. srh joxhqsnx, dvsodfohj srh vaqrnx rvj innj rncj, tvjh rod wve vfs vaj dvs jnwa vtnaids ud. wh hbqrvaihj v fhw wnxjd cvzoce. vfshxwvxjd srhxh wvd dochaqh na mnvxj srh evqrs. fnx dnth xhvdna nx nsrhx wh joj ans mhioa srvs ivth nf jntoanhd. wh fhcs thjosvsoph, vaj fos fnx ansroai mus ycvqoj dsvxoai. srh jve wvd hajoai oa v dhxhaose nf dsocc vaj hbguodosh mxoccovaqh. srh wvshx drnah yvqofoqvcce; srh dke, wosrnus v dyhqk, wvd v mhaoia otthadose nf uadsvoahj coirs; srh phxe tods na srh hddhb tvxdr wvd cokh v ivuze vaj xvjovas fvmxoq, ruai fxnt srh wnnjhj xodhd oacvaj, vaj jxvyoai srh cnw drnxhd oa jovyrvanud fncjd. nace srh icnnt sn srh whds, mxnnjoai nphx srh uyyhx xhvqrhd, mhqvth tnxh dntmxh hphxe toaush, vd of vaihxhj me srh vyyxnvqr nf srh dua.

Based on the challenge description, it seems that they made a lot of substutions and this points to susitution cipher.

Solution#

To assist in solving, we can load the ciphertext into a tool such as: Mono-alphabetic Substitution

This tool uses frequency analysis and heuristics to predict the English plaintext.

From this, we got :

-------------------------------------------------------------------------------
CONGRATS HERE IS YOUR FLAG - FREQUENCY_IS_C_OVER_LAMBDA_F3FF3A4D
-------------------------------------------------------------------------------
BETWEEN US THERE WAS, AS I HAVE ALREADY SAID SOMEWHERE, THE BOND OF THE SEA. BESIDES HOLDING OUR HEARTS TOGETHER THROUGH LONG PERIODS OF SEPARATION, IT HAD THE EFFECT OF MAKING US TOLERANT OF EACH OTHER'S YARNSAND EVEN CONVICTIONS. THE LAWYERTHE BEST OF OLD FELLOWSHAD, BECAUSE OF HIS MANY YEARS AND MANY VIRTUES, THE ONLY CUSHION ON DECK, AND WAS LYING ON THE ONLY RUG. THE ACCOUNTANT HAD BROUGHT OUT ALREADY A BOX OF DOMINOES, AND WAS TOYING ARCHITECTURALLY WITH THE BONES. MARLOW SAT CROSS-LEGGED RIGHT AFT, LEANING AGAINST THE MIZZEN-MAST. HE HAD SUNKEN CHEEKS, A YELLOW COMPLEXION, A STRAIGHT BACK, AN ASCETIC ASPECT, AND, WITH HIS ARMS DROPPED, THE PALMS OF HANDS OUTWARDS, RESEMBLED AN IDOL. THE DIRECTOR, SATISFIED THE ANCHOR HAD GOOD HOLD, MADE HIS WAY AFT AND SAT DOWN AMONGST US. WE EXCHANGED A FEW WORDS LAZILY. AFTERWARDS THERE WAS SILENCE ON BOARD THE YACHT. FOR SOME REASON OR OTHER WE DID NOT BEGIN THAT GAME OF DOMINOES. WE FELT MEDITATIVE, AND FIT FOR NOTHING BUT PLACID STARING. THE DAY WAS ENDING IN A SERENITY OF STILL AND EXQUISITE BRILLIANCE. THE WATER SHONE PACIFICALLY; THE SKY, WITHOUT A SPECK, WAS A BENIGN IMMENSITY OF UNSTAINED LIGHT; THE VERY MIST ON THE ESSEX MARSH WAS LIKE A GAUZY AND RADIANT FABRIC, HUNG FROM THE WOODED RISES INLAND, AND DRAPING THE LOW SHORES IN DIAPHANOUS FOLDS. ONLY THE GLOOM TO THE WEST, BROODING OVER THE UPPER REACHES, BECAME MORE SOMBRE EVERY MINUTE, AS IF ANGERED BY THE APPROACH OF THE SUN.

alt text

From this decryption, we can also extract the substitution mapping used in the challenge:

⇒ VMQJHFIROLKCTANYGXDSUPWBEZ (Original Encryption Alphabet)
⇒ NXLSYFQEGDKJBOIVCHTMUAWRPZ (Reciprocal ⇅ Decryption Alphabet)

This mapping illustrates how each ciphertext letter was substituted to produce the readable plaintext.

âš¡ Raikiri

🎉 Flag pwned!

FREQUENCY_IS_C_OVER_LAMBDA_F3FF3A4D
💡 TL;DR / Lesson Learned

Challenge gives a long ciphertext via netcat.
Hint suggests substitution cipher → use monoalphabetic solver.
Paste ciphertext into DCODE → instantly recovers readable English and flag.