Blog

9 Mar 2017

Mapulogalamu a Mapulogalamu: Kodi Hook N'chiyani?

Mapulogalamu a Mapulogalamu: Kodi Hook N'chiyani?

Tiyenera Kudziwa Pafupi Mitundu Yambiri ya Chigoba.

Kodi Hook N'chiyani?Kukula kwa mapulogalamu, Kuphika ndi lingaliro lololeza kusintha khalidwe la pulogalamu. Ndondomeko yothekayo imakupatsani inu kusintha khalidwe loyamba la chinachake popanda kusintha code yanu poyerekeza kalasi. Izi zatsirizidwa ndi kulembetsa njira zowonetsera.

Kugwiritsa ntchito kotereku kumathandiza kwambiri chifukwa cha kuwonjezera ntchito zatsopano ku ntchito, kuphatikizapo kulimbikitsa makalata pakati pa njira zina ndi mauthenga a dongosolo. Nkhono zimakhala zochepetseratu kupyolera mwa kukonza kukonzekera komwe dongosolo likuyenera kuchita pa uthenga uliwonse. Iyenera kuwonetsedwa pokhapokha ngati ikufunidwa ndikuchotsedweratu mwamsanga.

Ganizirani kuti mukugwiritsa ntchito kasitomala wothandizira (CMS) kuchokera kwa munthu akunja ndipo mungafune kuti mkulu wapamwamba azichenjezedwa ndi imelo nthawi iliyonse posindikizidwa mndandanda komanso kuti khalidwe ili silokhazikika pa chipangizocho. Padzakhala njira zingapo zopita patsogolo:

Sinthani code ya source ya CMS si malingaliro abwino, mutatha zonse zotsitsimutsa za chipangizocho mutha kulimbana ndi vuto la kutaya kusintha kwanu kapena simungathe kupitiliza chirichonse chomwe chimatsitsimutsidwa;

  • Pangani maganizo anu enieni a CMS ndi malingaliro ena owopsya, zinthu zonse zoganiziridwa, mulibe mphamvu zokwanira kapena zinthu zokwanira kuti mupange zinthu zatsopano kapena kusunga zomwe mungachite;
  • Fufuzani mwayi wogwiritsira ntchito ndowe, kutanthauza ngati CMS ikuyang'ana kunja kwa ma modules kapena ma modules a zinthu zina zotchulidwa kuti zichitike pamphindi wopempha, chifukwa cha izi, kugawidwa kwa nsanamira zatsopano.
  • Pansi pano mbali imodzi yogwiritsira ntchito nkhumba imasinthasintha kawirikawiri kuchokera ku chipangizo kupita ku chida. Mkhalidwe wabwino kwambiri wa ndowe sikutanthauza kachidindo yoyamba. Muzitsulo zonse zogwiritsira ntchito zamagetsi onse otseguka omwe ali ndi intermittent amasintha mantra yomwe imadzisintha yokha sichisintha pakati. Ngakhale kuti mukupumula kuti musamangoganizira, munthu aliyense amene amabwera pambuyo pake sangaganize za kusintha kwake, ndipo munthu yemwe sanena mozama ndi inuyo, osati zipangizo.

Zowonjezereka ndi njira ina yokondedwa yogwiritsira ntchito njira zogwirira ntchito zomwe zimalola kuti ntchitoyi iwonjezere machitidwe ake okhazikika. Njira zogwiritsira ntchito ndowe zimapangitsa kuti zinthu zisamayende bwino komanso kuti azikhala ndi malo osiyanasiyana.

Zosintha Zatsopano Zamakono amapereka Mapulogalamu Opanga Mapulogalamu ku Gurgaon, Delhi NCR ku India.

Nkhono Monga Zitsanzo Zamakono

Ndizosangalatsa kuona kuti zambiri (zonse) zolongosoka zimapanga chitsanzo cha zikopa. Amayankhula momwe angapangire machitidwe a mavuto. Ena amadalira ulamuliro wa chitukuko: Zosintha, Zowona, Zomangirira, Lamulo, Wamasulira, Wowang'anitsitsa, Wowonetsera, Wachikhalidwe, Wachikhalidwe, ndi Njira.

Zina mwa zitsanzo zonse ziwiri za kugwirizana ndi kupatukana kwa magawo: Chitsanzo cha Template ndi Bridge.

Semantics imatchulidwa kawirikawiri mu dzina lachangu (mwachitsanzo, mu Lamulo, njirayi imatchedwa execute ()).

Njira Yoyenera Njira Kuphika

Kukula kwa Mapulogalamu - Kodi Chigoduli - Chiganizo cha 1Zeni zenizeni zimabweretsa njira yosadziwika kuchokera ku njira zowonongeka, koma popeza njira zowonongeka zingasinthidwe, wolembayo sakudziwa adiresi ya mphamvu yeniyeni pamene muitcha mu code yanu. Wolembayo, motero, akusonkhanitsa njira yabwino yowonjezera (VMT), yomwe imapereka njira yoperekera maulendo pa malo othamanga. Njira iliyonse imayambitsidwa pa nthawi yothamanga kupyolera mu VMT. VMT ya funso ili ndi njira zonse zowonjezereka, komanso zomwe zimalengeza. Choncho, njira zamakono zimagwiritsa ntchito kukumbukira kwambiri kuposa njira zowonjezera, ngakhale kuti zimathamanga mofulumira.

Popeza VMT ndi tebulo yomwe ili ndi ziganizo ndi makalata okumbukila a interface capacities, zomwe ziyenera kuchitidwa ndikutenganso adiresi yoyamba kukumbukira ndi adilesi ya ntchito yolondola. Pakati pa mizere iyi, njira yotchedwa idzalembedweratu, ndipo khalidwe latsopano lachilakolako la mphamvu lidzachitidwa.

Kuphika API

Kukula kwa Mapulogalamu - Kodi Hook - Point 2Kukumbidwa kwa API ikukulolani kuti mubwezeretsenso zinthu zomwe zimagwira ntchito. Pokhala ndi luso logwira zinthu zoterezi, mukhoza kusintha magawo awo mwa kusintha ntchito yomwe idzachitidwe poyamba.

Zingatheke, mwachitsanzo, kudula chidutswa cha kafukufuku weniweni, sungani pempho kuchokera kuntchito, ndipo mufunse chitsimikizo cha kasitomala kuti musungire malo osungira chinsinsi ku bwaloli, ndi zina.

Inde, kudula kwakukulu kwa chisankho chiri m'dera la chitetezo, mwachitsanzo, kachilombo ka HIV ndi tizilombo toyambitsa matenda. Khalani monga momwe zingakhalire, pali zochitika mu chitukuko chathu chachizolowezi komwe Hooking API, ikhoza kukhala njira yopambana.

Kulumikiza pulojekiti Kuphika, mu mkhalidwe wathu wapadera, kumatanthauza kupeza API kuchokera ku OS, kapena kuchokera ku DLL iliyonse, ndikusintha kuphedwa kwake kwina kwinakwake, makamaka ndendende, kumalo ena. Pali njira zazikulu ziwiri:

EAT ndi IAT: onse EXE / DLL ali ndi API kuti alowe ndikugulitsa matebulo. Magome awa ali ndi zolemba zomwe zikuwonetsa API Entry Point. Mwa kusintha malingaliro awa, kuwapangitsa iwo kusonyeza kuyitana kwathu, ife tiri ndi ndowe. Khalani monga momwe zingathere, ngati EXE / DLL isatumize API, njirayi siigwira ntchito;

Kuchokera kwa Olemba Zipangizo Zogwiritsa Ntchito: Monga momwe tanenera kale, panthawi yoti tikhoza kuwonjezera kuimbira foni yathu kumayambiriro kwa chikhombo cha API, tikhoza "kuigwiritsa ntchito", kutipangitsa mphamvu yathu kuyendetse pa chilichonse chomwe API idatchulidwa. Khalani monga momwe zingakhalire, pali vuto: ngati ndondomeko yathu itayendetsedwa, tifunika kuyitanira API yoyamba, tikhoza kubwerera mmbuyo pa kuyitana kwathu, ndipo madzi osefukira adzakhazikitsidwa. Chokonzekera chimodzi ndichokonza ndowe kuti ikhale ndi mphamvu yoitanira API, kuyesanso kachiwiri kamodzi kamene kamaperekedwa. Khalani monga momwe zingathere, pakati pa nthakayi, ma call angapo API angapangidwe ndipo sangagwiritse ntchito kuyitana kwathu;

Phokoso lokhazikika ndilo mfundo yomwe ife timapeza malangizo apamwamba a mphamvu, ndipo timagulitsa kwa Jump, Push kapena Call for our capacity.

Kuwerengedwa kuwerengedwa: Mawindo a Windows ntchito amaphatikizapo hooking API. Tiyenera kudziwa momwe Windows API ikugwirira ntchito?

Nthawi Yokophika

Kukula kwa Mapulogalamu - Kodi Nkhwangwa - Mfundo Zotani 3A zazingwe zimapangitsa kuti malo osasunthika ndi machitidwe a malo osiyanasiyana omwe angatulukidwe kuchokera pakangoyamba kogwiritsa ntchito zochitika zina zimakhala kusintha kwa mphamvu. Zolinga zojambula zojambula zimasintha kukonzekera masitepe. Kumapeto kwa tsiku, pamene mwambo umapezeka, wothandizira amayankha njira zogwirira ntchito pa zinthu zomwe zisanalembedwe zomwe zikuchitika nthawi yokonzekera ntchito. Milandu ya zochitika: mauthenga awindo, kutumidwa kumalo osungirako makalata.

Mkati mwa IAT Kuphika

Kukula kwa Mapulogalamu - Kodi Hook - Mfundo Yotani 4Iyi njira mu Windows ili ndi tebulo lotchedwa Import Address Table (IAT), yomwe imasunga zojambula kumtundu wotumizidwa ndi DLL pa njira iliyonse. Tebulo ili likukhala pang'onopang'ono ndi adiresi ya zinthu za DLL pa nthawi yothamanga.

Pogwiritsa ntchito luso lapadera, titha kupanga tebulo la IAT lolembedwa, pokonzekera kusintha maadiresi ake ndi adiresi ya mwambo wokhoza mwambo, kutanthauzira tebulo monga kuwerenga-pokhapokha mutasintha. Pomwepo ndondomekoyi ikayesa kuyitanitsa mphamvu, aderesi yake imapezeka mu tebulo la IAT, ndipo pointer ikubwezedwa. Pamene tebulo la IAT lasinthidwa, chizoloŵezi cha chizolowezi chimabweretsedwera choyamba chokhazikika ndipo chikhocho chimalowetsedwa mu njirayi.

Netfilter Hook

Kukula kwa Mapulogalamu - Kodi Hook - Point 5Netfilter ndi gawo la Linux gawo lodziwika kwambiri kuposa 2.4. Ndiyo yotsogolera mtolo kuchoka, NAT, firewall, redirection, pakati pa ena. Netfilter ndi yodabwitsa kwambiri, ndipo zolembedwa zake zatha. Zimasiya mwayi wogwiritsira ntchito zikhomo mu code ya Kernel, zomwe zimagwiritsidwa ntchito mosavuta komanso zomwe zimagwidwa ndi gulu. Ma Hooks amasiya zotsatira zochepa zomwe zingagwiritsidwe ntchito ndipo akhoza kudzaza ngati zochitika zinazake.

Kutsiliza:

Kukonzekera kwa Mapulogalamu - Kodi Hook - yotsirizaKodi njira zogwiritsira ntchito pulogalamu zimakhala zothandiza ndipo zimatsegula zowonjezereka za zotsatira zopanga mapulogalamu a mapulogalamu, komabe ziyenera kugwiritsidwa ntchito mosamala popeza zikuphatikizapo chidwi chodziwika bwino pa njira zomwe zimayendera ndikusintha yoyamba khalidwe la OS, mapulogalamu kapena mapulogalamu ena mapulogalamu, zomwe zimapangitsa kuti zikhale zovuta kumvetsetsa zofunikira za mapulogalamu. Zina kuposa zimenezo, monga momwe tafotokozera kale m'nkhani ino, kugwiritsa ntchito machitidwewa popanda paradigm kungathetseretu ntchitoyi.

GTranslate Your license is inactive or expired, please subscribe again!