hacktricks/reversing-and-exploiting/linux-exploiting-basic-esp/common-binary-protections-and-bypasses
2024-07-18 22:14:33 +00:00
..
aslr Translated ['binary-exploitation/basic-stack-binary-exploitation-methodo 2024-07-18 22:14:33 +00:00
pie Translated ['binary-exploitation/basic-stack-binary-exploitation-methodo 2024-07-18 22:14:33 +00:00
stack-canaries Translated ['binary-exploitation/basic-stack-binary-exploitation-methodo 2024-07-18 22:14:33 +00:00
no-exec-nx.md Translated ['binary-exploitation/basic-stack-binary-exploitation-methodo 2024-07-18 22:14:33 +00:00
README.md Translated ['binary-exploitation/basic-stack-binary-exploitation-methodo 2024-07-18 22:14:33 +00:00
relro.md Translated ['binary-exploitation/basic-stack-binary-exploitation-methodo 2024-07-18 22:14:33 +00:00

Ulinzi wa Kawaida wa Binary

{% hint style="success" %} Jifunze na fanya mazoezi ya AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Jifunze na fanya mazoezi ya GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %}

Wezesha Faili za Core

Faili za Core ni aina ya faili inayozalishwa na mfumo wa uendeshaji wakati mchakato unaporomoka. Faili hizi zinakamata picha ya kumbukumbu ya mchakato ulioanguka wakati wa kumalizika kwake, ikiwa ni pamoja na kumbukumbu ya mchakato, register, na hali ya programu ya kuhesabu, pamoja na maelezo mengine. Picha hii inaweza kuwa na thamani kubwa kwa ajili ya kutatua matatizo na kuelewa kwa nini ajali ilitokea.

Kuwezesha Uzalishaji wa Core Dump

Kwa kawaida, mifumo mingi inapunguza ukubwa wa faili za core hadi 0 (yaani, hazizalishi faili za core) ili kuokoa nafasi ya diski. Ili kuwezesha uzalishaji wa faili za core, unaweza kutumia amri ya ulimit (katika bash au shell zinazofanana) au kuunda mipangilio ya mfumo mzima.

  • Kwa kutumia ulimit: Amri ulimit -c unlimited inaruhusu kikao cha shell cha sasa kuunda faili za core zenye ukubwa usio na kikomo. Hii ni muhimu kwa vikao vya kutatua matatizo lakini si ya kudumu kati ya upya au vikao vipya.
ulimit -c unlimited
  • Mipangilio Endelevu: Kwa suluhisho la kudumu zaidi, unaweza kuhariri faili ya /etc/security/limits.conf ili kujumuisha mstari kama * soft core unlimited, ambayo inaruhusu watumiaji wote kuzalisha faili za core zisizo na kikomo bila ya lazima kuweka ulimit kwa mikutano yao.
* soft core unlimited

Kuchambua Faili za Core kwa GDB

Ili kuchambua faili ya core, unaweza kutumia zana za ufuatiliaji kama GDB (GNU Debugger). Ikiwa una executable ambayo ilizalisha core dump na faili ya core inaitwa core_file, unaweza kuanza uchambuzi kwa:

gdb /path/to/executable /path/to/core_file

Amri hii inachukua executable na faili la core ndani ya GDB, ikikuruhusu kuchunguza hali ya programu wakati wa ajali. Unaweza kutumia amri za GDB kuchunguza stack, kuchunguza mabadiliko, na kuelewa sababu ya ajali.

{% hint style="success" %} Learn & practice AWS Hacking:HackTricks Training AWS Red Team Expert (ARTE)
Learn & practice GCP Hacking: HackTricks Training GCP Red Team Expert (GRTE)

Support HackTricks
{% endhint %}