Last active
January 26, 2017 23:30
-
-
Save DanAtkinson/e4e333e1fa40f18a565974481fdced34 to your computer and use it in GitHub Desktop.
Example of how to lull a user into executing potentially dangerous commands into their Windows command prompt by 'injecting' hidden code using CSS.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!doctype html> | |
<html> | |
<head> | |
<title>Windows code sample 'hack'</title> | |
</head> | |
<body> | |
<h1>Code sample</h1> | |
<p>Copy and paste the below code sample into your command prompt to see your directory paged... And other stuff...</p> | |
<p>Inspiration taken from <a href="http://lifepluslinux.blogspot.com.au/2017/01/look-before-you-paste-from-website-to.html">Suresh Alse</a>. For a little more information, see my <a href="https://danatkinson.github.io/2017/01/26/How-to-hack-a-trusting-developer-s-machine/" title="How to hack a trusting Windows developer's machine">blog post</a> at danatkinson.github.io.</p> | |
<code style="background-color:#eeeeee;padding:10px;"> | |
<span>dir</span> | |
<!-- Here it is --> | |
<span style="color:#F3F5F6;position:absolute;left:-100px;top:-100px;height:0px;z-index:-100;display:inline-block;">& | |
cls & echo Haha! You gave me access to your computer! & | |
ping 127.0.0.1 -n 2 > nul & | |
cls & echo h4cking ## (10%) & | |
ping 127.0.0.1 -n 2 > nul & | |
cls & echo h4cking ### (20%) & | |
ping 127.0.0.1 -n 2 > nul & | |
cls & echo h4cking ##### (33%) & | |
ping 127.0.0.1 -n 2 > nul & | |
cls & echo h4cking ####### (40%) & | |
ping 127.0.0.1 -n 2 > nul & | |
cls & echo h4cking ########## (50%) & | |
ping 127.0.0.1 -n 2 > nul & | |
cls & echo h4cking ############# (66%) & | |
ping 127.0.0.1 -n 2 > nul & | |
cls & echo h4cking ##################### (99%) & | |
ping 127.0.0.1 -n 2 > nul & | |
cls & echo h4cking ####################### (100%) & | |
cls & echo Hacking complete. & | |
echo Use GUI interface using visual basic to track my IP & | |
ping 127.0.0.1 -n 5 > nul & | |
cls | |
<br>dir | |
</span> | |
<span>/w /p<br> | |
</span> | |
</code> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment