{"id":595,"date":"2020-01-22T19:32:16","date_gmt":"2020-01-22T18:32:16","guid":{"rendered":"https:\/\/privat.andreas-klingler.de\/itsec\/?p=595"},"modified":"2023-12-20T19:40:13","modified_gmt":"2023-12-20T18:40:13","slug":"gcc-compiler","status":"publish","type":"post","link":"https:\/\/infosec.andreas-klingler.de\/?p=595","title":{"rendered":"<span class=\"caps\">GCC<\/span>"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">Cross-compiling for 32\/64 bit systems<\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li>sudo apt-get install gcc-multlib<\/li><li>gcc \u2011m32 datei.c<\/li><\/ul>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Tipp<\/strong>: Add \u2011sta\u00adt\u00adic for a sta\u00adt\u00adic binary.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Note that you need to install pack\u00adets for the tar\u00adget plat\u00adform, e.g. apt install gcc-i686-linux-gnu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cross-compiling for Windows<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Install the pack\u00adages like <code>apt install gcc-mingw-w64<\/code>. Then use <code>x86_64-w64-mingw32-gcc execute.c -o execute.exe<\/code>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Disable security features<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You can use <a href=\"https:\/\/trapkit.de\/tools\/checksec\/\">checksec.sh<\/a> to see which secu\u00adri\u00adty tech\u00adniques are enabled in a executable.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><thead><tr><th>Pro\u00adtec\u00adtion<\/th><th>gcc para\u00adme\u00adter to disable<\/th><\/tr><\/thead><tbody><tr><td><span class=\"caps\">PIE<\/span><\/td><td>-no-pie<\/td><\/tr><tr><td>Stack canary<\/td><td>-fno-stack-pro\u00adtec\u00adtor<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Cross-com\u00adpil\u00ading for 32\/64 bit sys\u00adtems sudo apt-get install gcc-multlib gcc \u2011m32 datei.c Tipp: Add \u2011sta\u00adt\u00adic for a sta\u00adt\u00adic bina\u00adry. Note that you need to install pack\u00adets for the tar\u00adget plat\u00adform, e.g. apt install gcc-i686-lin\u00adux-gnu. Cross-com\u00adpil\u00ading for Win\u00addows Install the pack\u00adages like apt install gcc-mingw-w64. Then use x86_64-w64-ming\u00adw32-gcc execute.c \u2011o execute.exe. Dis\u00adable secu\u00adri\u00adty fea\u00adtures You&nbsp;can&nbsp;[\u2026]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"wp_typography_post_enhancements_disabled":false,"footnotes":""},"categories":[468],"tags":[172,171],"class_list":["post-595","post","type-post","status-publish","format-standard","hentry","category-general","tag-compiler","tag-gcc"],"_links":{"self":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/595","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=595"}],"version-history":[{"count":8,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/595\/revisions"}],"predecessor-version":[{"id":3326,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=\/wp\/v2\/posts\/595\/revisions\/3326"}],"wp:attachment":[{"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=595"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=595"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/infosec.andreas-klingler.de\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=595"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}