• Stars
    star
    118
  • Rank 299,923 (Top 6 %)
  • Language
    C
  • License
    GNU General Publi...
  • Created over 7 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Minifilter driver development Hands-On-Labs

๋ฏธ๋‹ˆํ•„ํ„ฐ ๋“œ๋ผ์ด๋ฒ„ ๊ฐœ๋ฐœ ์‹ค์Šต

BoB 7th, programming lecture by somma ([email protected])


๊ฐœ๋ฐœ ํ™˜๊ฒฝ ์„ค์ •

Download the Windows Driver Kit (WDK) ๋ฅผ ์ฐธ์กฐํ•ด์„œ ๊ฐœ๋ฐœ ํˆด์„ ์„ค์น˜

  1. Visual Studio ์„ค์น˜

    • Visual studio 2017 ์„ค์น˜
    • ๋ฐ˜๋“œ์‹œ C/C++ ๊ฐœ๋ฐœํ™˜๊ฒฝ์„ ๋ชจ๋‘ ์„ค์น˜ (์„ค์น˜ ์˜ต์…˜ ์„ ํƒ)
  2. WDK ์„ค์น˜

  3. Virtual KD ์„ค์น˜ ( Virtual KD )

    • install ์— ์„ค๋ช…๋œ ๋Œ€๋กœ Debugger/Debuggee ์„ค์ •์„ ์™„๋ฃŒํ•  ๊ฒƒ
    • Debuggee ์˜ ์ปค๋„์„ Break ํ•  ์ˆ˜ ์žˆ๋Š”์ง€ ๋ฐ˜๋“œ์‹œ ํ™•์ธํ•  ๊ฒƒ
  4. git ์„ค์น˜

  5. vcpkg ์„ค์น˜ I (์ง์ ‘ ๋นŒ๋“œํ•˜๊ธฐ))

    ์ž์„ธํ•œ ๋‚ด์šฉ์€ https://github.com/Microsoft/vcpkg ์˜ README.md ๋ฅผ ์ฐธ๊ณ 

    1. ์†Œ์Šค์ฝ”๋“œ ๊ฐ€์ ธ์˜ค๊ธฐ

       C:\>git clone https://github.com/Microsoft/vcpkg.git c:\work.vcpkg
       Cloning into 'c:\work.vcpkg'...
       ...
      
    2. ๋นŒ๋“œ

       C:\work.vcpkg>c:\work.vcpkg\bootstrap-vcpkg.bat
       Microsoft (R) Build Engine version 14.0.25420.1
       ...
      
    3. ํŒจํ‚ค์ง€ ์„ค์น˜

       vcpkg   install boost:x86-windows boost:x86-windows-static boost:x64-windows boost:x64-windows-static \
               curl:x86-windows curl:x86-windows-static curl:x64-windows curl:x64-windows-static \
               sqlite3:x86-windows sqlite3:x86-windows-static sqlite3:x64-windows sqlite3:x64-windows-static \
               jsoncpp:x86-windows jsoncpp:x86-windows-static jsoncpp:x64-windows jsoncpp:x64-windows-static \
               gtest:x86-windows gtest:x86-windows-static gtest:x64-windows gtest:x64-windows-static
      
    4. Visual Studio ์—ฐ๋™

       C:\work.vcpkg>vcpkg integrate install
       Applied user-wide integration for this vcpkg root.
      
       All MSBuild C++ projects can now #include any installed libraries.
       Linking will be handled automatically.
       Installing new libraries will make them instantly available.
      
       CMake projects should use -DCMAKE_TOOLCHAIN_FILE=C:/work.vcpkg/scripts/buildsystems/vcpkg.cmake
      
  6. vcpkg ์„ค์น˜ II (๋นŒ๋“œ๋œ ๋ฐ”์ด๋„ˆ๋ฆฌ ์‚ฌ์šฉํ•˜๊ธฐ )

    vcpkg ๋นŒ๋“œ์— ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š” ๊ฒฝ์šฐ visual studio 2017 ์šฉ์œผ๋กœ ๋ฏธ๋ฆฌ ๋นŒ๋“œ๋œ ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ๋‹ค์šด๋กœ๋“œ ํ•  ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

    1. ๋ฏธ๋ฆฌ ๋นŒ๋“œ๋œ ๋ฐ”์ด๋„ˆ๋ฆฌ๋ฅผ ์—ฌ๊ธฐ์—์„œ ๋‹ค์šด๋กœ๋“œํ•ฉ๋‹ˆ๋‹ค.

    2. vcpkg ํด๋”์— ๋ฎ์–ด์”๋‹ˆ๋‹ค (!๋!)

    3. Visual Studio ์—ฐ๋™

       C:\work.vcpkg>vcpkg integrate install
       Applied user-wide integration for this vcpkg root.
      
       All MSBuild C++ projects can now #include any installed libraries.
       Linking will be handled automatically.
       Installing new libraries will make them instantly available.
      
       CMake projects should use -DCMAKE_TOOLCHAIN_FILE=C:/work.vcpkg/scripts/buildsystems/vcpkg.cmake
      
       C:\work.vcpkg>
      
  7. _MyLib ๊ฐ€์ ธ์˜ค๊ธฐ

    Windows programming ์— ๋„์›€๋˜๋Š” ์œ ํ‹ธ๋ฆฌํ‹ฐ ๋ชจ๋“ˆ์ž…๋‹ˆ๋‹ค.

    1. _MyLib ์†Œ์Šค์ฝ”๋“œ ํด๋กœ๋‹

       C:\>git clone https://github.com/somma/_MyLib.git c:\work.mylib
       Cloning into 'c:\work.mylib'...
       ...
      
    2. _MyLib ์†Œ์Šค์ฝ”๋“œ ๋นŒ๋“œ _MyLib ์„ ๋นŒ๋“œ๊ฐ€ ์™„๋ฃŒ๋˜๋ฉด x:\ ๋“œ๋ผ์ด๋ธŒ์— ์ƒ์„ฑ๋œ ์‹คํ–‰ํŒŒ์ผ์„ ๋ณต์‚ฌํ•˜๋„๋ก ์„ค์ •๋˜์–ด์žˆ์œผ๋ฏ€๋กœ _MyLib ์˜ ์†์„ฑํŽ˜์ด์ง€์— ๋“ค์–ด๊ฐ€์„œ ์•„๋ž˜ Post-BuildEvent ์„น์…˜์— ์ •์˜๋œ ๋‚ด์šฉ์„ ์‚ญ์ œํ•œ๋‹ค.

      img

  8. WDK ์ƒ˜ํ”Œ ๋นŒ๋“œ

    • ๊ฐœ๋ฐœํ™˜๊ฒฝ์— Windows-driver-samples ์„ ๋‹ค์šด๋กœ๋“œ ํ˜น์€ clone ํ•ด ๋‘”๋‹ค.
    • Windows-driver-samples/filesys/miniFilter/ ์•„๋ž˜์— ์žˆ๋Š” ํ”„๋กœ์ ํŠธ๋“ค์„ Visual studio 2017 ๋ฅผ ํ†ตํ•ด ๋นŒ๋“œํ•ด๋ณธ๋‹ค.
    • ๊น”๋”ํ•˜๊ฒŒ ๋นŒ๋“œ๊ฐ€ ๋˜์ง€ ์•Š๋Š”๋‹ค๋ฉด ๋ญ”๊ฐ€ ๋ฌธ์ œ๊ฐ€ ์žˆ๋Š”๊ฒƒ์ด๋‹ˆ ์ž์‹ ์˜ ํ™˜๊ฒฝ์„ค์ •์— ๋ฌธ์ œ๊ฐ€ ์—†๋Š”์ง€ ๋‹ค์‹œ ํ•œ๋ฒˆ ํ™•์ธํ•œ๋‹ค.

์ปค๋„ ๋””๋ฒ„๊น… ํ™˜๊ฒฝ ์„ค์ •

  • VMWARE (Virtual Box ๋„ ๊ฐ€๋Šฅ)
  • Windows 10 x64 ๊ฐ€์ƒ๋จธ์‹ 
    • ์ง์ ‘ ์„ค์น˜ํ•ด์„œ ๊ฐ€์ ธ์˜ค๊ธธ ๊ถŒ์žฅ
    • ์•„๋‹ˆ๋ฉด Free Windows Image ์—์„œ ๋‹ค์šด๋กœ๋“œ
  • Virtual KD
    • install ์— ์„ค๋ช…๋œ ๋Œ€๋กœ Debugger/Debuggee ์„ค์ •์„ ์™„๋ฃŒํ•  ๊ฒƒ

๊ธฐํƒ€

  • macbook ์‚ฌ์šฉ์ž์ž…๋‹ˆ๋‹ค. ์–ด๋–ป๊ฒŒ ํ•˜์ฃ ?

    ์ธํ„ฐ๋„ท ์ฐพ์•„๋ณด๋ฉด ๋‘๊ฐœ์˜ windows ๊ฐ€์ƒ๋จธ์‹ ์„ ํ†ตํ•ด์„œ ์ปค๋„๋””๋ฒ„๊น… ๊ฐ€๋Šฅํ•œ ์‹œ๋‚˜๋ฆฌ์˜ค๊ฐ€ ๋งŽ์ด ์žˆ์Šต๋‹ˆ๋‹ค. ์ธํ„ฐ๋„ท์—์„œ ์ฐพ์•„๋ณด๊ณ , ์„ค์ •ํ•ด์˜ค์„ธ์š”.

  • linux ์‚ฌ์šฉ์ž๋Š”์š”?

    ๋งˆ์ฐฌ๊ฐ€์ง€. virtual box ๋กœ windows ์ธ์Šคํ„ด์Šค ๋‘๊ฐœ ๋„์›Œ์„œ ๊ฐ€์ƒ๋จธ์‹  ๋ผ๋ฆฌ ์ปค๋„๋””๋ฒ„๊น… ๊ฐ€๋Šฅํ•ฉ๋‹ˆ๋‹ค. ์ธํ„ฐ๋„ท์—์„œ ์ฐพ์•„๋ณด๊ณ , ์„ค์ •ํ•ด์˜ค์„ธ์š”.

  • ์ „ visual studio 2015 ๋ฅผ ์„ค์น˜ํ–ˆ๋Š”๋ฐ์š”?

    visual studio 2017 ์„ ์„ค์น˜ํ•˜์„ธ์š”.

  • ์ž˜ ์•ˆ๋˜๋Š”๋ฐ์š”?

    ๋ ๋•Œ๊นŒ์ง€ ํ•ด๋ณด์„ธ์š”. ๊ตฌ๊ธ€๋ง๋„ ์ข€ ํ•ด๋ณด๊ตฌ์š”.