{"id":128307,"date":"2021-06-10T13:30:06","date_gmt":"2021-06-10T13:30:06","guid":{"rendered":"https:\/\/developer.apple.com\/news\/?id=keebiiyl"},"modified":"2021-06-10T13:30:06","modified_gmt":"2021-06-10T13:30:06","slug":"challenge-memgraph-capture-the-flag","status":"publish","type":"post","link":"https:\/\/sickgaming.net\/blog\/2021\/06\/10\/challenge-memgraph-capture-the-flag\/","title":{"rendered":"Challenge: Memgraph Capture the Flag"},"content":{"rendered":"<div class=\"inline-article-image\"><img decoding=\"async\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/09\/challenge-memgraph-capture-the-flag.jpg\" data-hires=\"false\" alt=\"Flag symbol on grey background\"><\/div>\n<p>In the &#8220;Detect and diagnose memory issues&#8221; session at WWDC21, we explored how debugging memory problems can help improve your app\u2019s performance, while \u201cSymbolication: Beyond the basics\u201d showcased debug symbols and how symbolication helps us connect the dots during code debugging. Now, it\u2019s time to put those new skills to work.<\/p>\n<p>If you like solving puzzles, you\u2019re in the right place. One of our engineers has hidden a memory easter egg in our secret app. We&#8217;re trying to track it down but all we know is that it has <code>format flag_&lt;unknown_string_here&gt;@WWDC<\/code>. You\u2019ll have to use the command line tools offered by macOS to investigate the memory issue, recover missing symbols, and and capture the rogue flag. <\/p>\n<h3>Begin the challenge<\/h3>\n<p>To get started, download the challenge .zip attached to this article and unzip the folder. We also have a message from our engineer to get you on the right track: <em>&#8220;Memgraph is a special binary plist. What can you find in its properties?\u201d<\/em><\/p>\n<p><a href=\"https:\/\/developer.apple.com\/sample-code\/wwdc\/2021\/challenges\/Developer_Tools_Challenge_Memgraph_capture_the_flag.zip\" class=\"icon icon-after icon-chevronright\">Download the Memgraph Capture the Flag Challenge material<\/a><\/p>\n<p>And once you\u2019ve explored the challenge, check out one solution to find the flag.<\/p>\n<section class=\"grid activity\">\n<section class=\"row\">\n<section class=\"column large-4 small-4 no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/news\/?id=3st92oup\" class=\"activity-image-link\"> <img decoding=\"async\" class=\"actiity-image medium-scale\" width=\"250\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/09\/challenge-memgraph-capture-the-flag-1.jpg\" data-hires=\"false\" alt> <\/a> <\/section>\n<section class=\"column large-8 small-8 padding-left-small padding-top-small padding-bottom-small no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/news\/?id=3st92oup\"> <\/p>\n<h4 class=\"no-margin-bottom activity-title\">Challenge: Solution to \u201cMemgraph Capture The Flag\u201d<\/h4>\n<p class=\"activity-description\">The \u201cMemgraph Capture the Flag\u201d challenge invites you to learn and practice memory debugging and symbolication with command line tools. If you haven\u2019t yet attempted the challenge or otherwise don\u2019t want to be spoiled on the necessary steps to complete it, we recommend returning to the&#8230;<\/p>\n<p> <\/a> <\/section>\n<\/section>\n<\/section>\n<p>You can solve these kinds of puzzles and track down memory issues in your own app, too. Try creating reference cycles in your app, saving a memgraph, and tracing them back to your source code. And for more debugging details, check out the WWDC21 sessions below.<\/p>\n<h3>Resources<\/h3>\n<section class=\"grid activity\">\n<section class=\"row\">\n<section class=\"column large-4 small-4 no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc21\/10211\" class=\"activity-image-link\"> <img decoding=\"async\" class=\"actiity-image medium-scale\" width=\"250\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/09\/challenge-memgraph-capture-the-flag-2.jpg\" data-hires=\"false\" alt> <\/a> <\/section>\n<section class=\"column large-8 small-8 padding-left-small padding-top-small padding-bottom-small no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc21\/10211\"> <\/p>\n<h4 class=\"no-margin-bottom activity-title\">Symbolication: Beyond the basics<\/h4>\n<p class=\"activity-description\">Discover how you can achieve maximum performance and insightful debugging with your app. Symbolication is at the center of tools such as Instruments and LLDB to help bridge the layers between your application\u2019s runtime and your source code. Learn how this process works and the steps you can take&#8230;<\/p>\n<p> <\/a> <\/section>\n<\/section>\n<\/section>\n<section class=\"grid activity\">\n<section class=\"row\">\n<section class=\"column large-4 small-4 no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc21\/10180\" class=\"activity-image-link\"> <img decoding=\"async\" class=\"actiity-image medium-scale\" width=\"250\" src=\"https:\/\/www.sickgaming.net\/blog\/wp-content\/uploads\/2022\/09\/challenge-memgraph-capture-the-flag-3.jpg\" data-hires=\"false\" alt> <\/a> <\/section>\n<section class=\"column large-8 small-8 padding-left-small padding-top-small padding-bottom-small no-padding-top no-padding-bottom\"> <a href=\"https:\/\/developer.apple.com\/wwdc21\/10180\"> <\/p>\n<h4 class=\"no-margin-bottom activity-title\">Detect and diagnose memory issues<\/h4>\n<p class=\"activity-description\">Discover how you can understand and diagnose memory performance problems with Xcode. We\u2019ll take you through the latest updates to Xcode\u2019s tools, explore Metrics, check out the memgraph collection feature in XCTest, and learn how to catch regressions using a Performance XCTest.\n<\/p>\n<p> <\/a> <\/section>\n<\/section>\n<\/section>\n<p><a href=\"https:\/\/developer.apple.com\/wwdc21\/challenges\/terms\/WWDC21_Challenge_Terms_Conditions.pdf\" class=\"icon icon-after icon-chevronright\">Read the WWDC21 Challenges Terms and Conditions<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the &#8220;Detect and diagnose memory issues&#8221; session at WWDC21, we explored how debugging memory problems can help improve your app\u2019s performance, while \u201cSymbolication: Beyond the basics\u201d showcased debug symbols and how symbolication helps us connect the dots during code debugging. Now, it\u2019s time to put those new skills to work. If you like solving [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":128308,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[55],"tags":[],"class_list":["post-128307","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-apple-developer-news"],"_links":{"self":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/128307","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/comments?post=128307"}],"version-history":[{"count":0,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/posts\/128307\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media\/128308"}],"wp:attachment":[{"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/media?parent=128307"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/categories?post=128307"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sickgaming.net\/blog\/wp-json\/wp\/v2\/tags?post=128307"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}