EXE passwords are visible in plain

User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

EXE passwords are visible in plain

Post by Otto »

Hello
I post this only for information.
I was not aware that the username and password are visible in plain text in the EXE.
Best regards,
Otto

Image
Image

My very simple obfuscator:

Code: Select all

function pw()
    local cPassword1    := "m"
    local cPassword3    := "P"
    local cPassword2    := "y"
    local cFiller       := "xyz"
    
    local cPassword5    := "0"
    local cPassword6    := "0"
    local cPassword7    := "7"
   local cPassword4     := "W"
   *----------------------------------------------------------

return ( cPassword1 + cPassword2 +  cPassword3 + cPassword4 + cPassword5 +  cPassword6 +  cPassword7 )

Image
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Armando
Posts: 2479
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México
Contact:

Re: EXE passwords are visible in plain

Post by Armando »

Hello Otto:

Is not enough for you the ENCRYPT() and DECRYPT() Classes?

Here is a sample:

Code: Select all

Encrypted :=  ENCRYPT("Armando","1234aeb")
MsgInfo(Encrypted)

Decrypted := DECRYPT(Encrypted,"1234aeb")
MsgInfo(Decrypted)

 
Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: EXE passwords are visible in plain

Post by Otto »

Hello Armando,
thank you. But this is no solution.

Please look in the exe file:
Image

Best regards,
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: EXE passwords are visible in plain

Post by Otto »

Thank you Cristobal your solution is working fine.
Best regards
Otto

Code: Select all

Put al init of your code
 
#pragma TEXTHIDDEN( 1 )
 
#include "FiveWin.ch"
 
.../...
 
and at end of your code
 
#pragma TEXTHIDDEN( 0 )



 
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: EXE passwords are visible in plain

Post by Rick Lipkin »

Otto

You need a good .exe shrinker\compression utility .. I use ASpack which is a commercial product .. never had any problems with the product .. prox 90 USD

http://www.aspack.com/aspack.html

Completely removes all text from the hex ..

Rick Lipkin
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: EXE passwords are visible in plain

Post by Silvio.Falconi »

Otto,
why you insert password on exe ?
for a sample I insert aes cript strings on a ini file sample : ( this is part of my license class)

Code: Select all

[License]
A1=dCfTZfLWOUdZPeAQ8TfcdVI=
B1=aB2bpXPVP0tU
C1=fyv7XdI2OsdDD9woMFbbcFAitQ==
D1=DJu+zxbevEtbD4zA0fTbek0IycPQk+psSk3Kwrei
F1=bC2bpYd3uUFPJw==
G1=VB3nbTY8L2wVk7WyNT1IXQOU8LE0WnlLBNHzsFNrb0xB0vLXYn1oCULTleZ0ei0KQ7Sk8HM/LgskhbL3NjwvbBWTtbI1PUhdA5TwsTRaeUs=
E1=GYu6N0YcvHgal4G6Nd3bek0IycPQk+psSk3Kwrei
H1=GYu6N0YcP2gal4G6Nd3D2QCK7KEw+znKSk3Kwrei
I1=Fsl2fg==
 
I challenge everyone to find the exact translation
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: EXE passwords are visible in plain

Post by Otto »

Silvio,
please post how you evaluate the passwords in your exe.
------------------------------------------------------------------
BTW the solution Cristobal posted works perfectly.
Best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Iris Gesser
Posts: 32
Joined: Fri Apr 22, 2016 10:19 pm

Re: EXE passwords are visible in plain

Post by Iris Gesser »

Good evening,
unfortunately I can not see the answer/post of Cristobal.
Kind regards
Iris
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: EXE passwords are visible in plain

Post by Silvio.Falconi »

oLicense:TLicense():New("test.lic")
oLicense:ReadLicense()

this give me an array with many variables

for a sample

LOCAL cFtp :=oLicense:cFtp
LOCAL cUser := oLicense:cUser
LOCAL cPW := oLicense:cPw
LOCAL cFtpDir :=oLicense:cFtpDir
LOCAL cUpdFile := "test.exe"
LOCAL cLocalDir :="c:\test\"

the I use tUpdate class of Haupt

on exe there is not password or words

the class read the file test.lic directly
Otto, try to converte the code I post into word correct !!
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
cnavarro
Posts: 5792
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: EXE passwords are visible in plain

Post by cnavarro »

Iris Gesser wrote:Good evening,
unfortunately I can not see the answer/post of Cristobal.
Kind regards
Iris
Iris
My answer was by mail, I did not publish it in the forum
Otto offered to publish it for me

https://github.com/harbour/core/blob/ma ... pragma.txt

#pragma TEXTHIDDEN(1) / ( 0 )

This scrambles any text between TEXTHIDDEN( 1 ) and TEXTHIDDEN( 0 ) in your exe
This makes the text strings defined in their source impossible to see in their EXEs
You can put it at the beginning and end of your source programs or just in a piece of code
Last edited by cnavarro on Sat Nov 10, 2018 11:10 am, edited 1 time in total.
C. Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
Si alguien te dice que algo no se puede hacer, recuerda que esta hablando de sus limitaciones, no de las tuyas.
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: EXE passwords are visible in plain

Post by Silvio.Falconi »

Cristobal,
maybe the father Otto does not talk to his daughter Iris or they have a fight.....:)
I wanted to go and greet our friends in Sillian at Christmas but I saw that they have their hotel all busy
Greetings to Renate!!!
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: EXE passwords are visible in plain

Post by Otto »

Hello Silvio
can you please show
some lines how TLicense decrypt.

Do you have something like:
::cPw := DECRYPT(Encrypted,"1234aeb")
in your class.
Thank you
and best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: EXE passwords are visible in plain

Post by Silvio.Falconi »

For decript I not use decript/encript of fivewin
On oldest class I used decript and encript
on new class I use Aes cifrature ADVANCED ENCRYPTION STANDARD 128 bit
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
User avatar
Otto
Posts: 4470
Joined: Fri Oct 07, 2005 7:07 pm
Contact:

Re: EXE passwords are visible in plain

Post by Otto »

>on new class I use Aes cifrature ADVANCED ENCRYPTION STANDARD 128 bit
Hello Silvio
how do you store the key.
c := aes256_Decrypt( c, @cKey )
Thank you and best regards
Otto
********************************************************************
mod harbour - Vamos a la conquista de la Web
modharbour.org

********************************************************************
User avatar
Silvio.Falconi
Posts: 4956
Joined: Thu Oct 18, 2012 7:17 pm

Re: EXE passwords are visible in plain

Post by Silvio.Falconi »

wich function is aes256_Decrypt ?
where you found it ?

I Have

Un / protectstring for a string
Un /protectFile for a file

and these use a aes protocol 128/192/256
it'is build from this document
https://csrc.nist.gov/csrc/media/public ... ps-197.pdf
type:
InitAes(128) //192/256 Load tables

string_text := "Antonio Linare from Fivetechsoft.com!" //ascii
Keychipher:= "2b 7e 15 16 28 ae d2 a6 ab f7 15 88 09 cf 4f 3c" //hexadecimal

cCifrated:= ProtectStringComplete(string_text,KeyChipher)
?cCifrated

cDecifrated:=UnProtectStringComplete(cCifrated,KeyChipher)
?cDecifrated
I use : FiveWin for Harbour August 2020 (Revision) - Harbour 3.2.0dev (r1712141320) - Bcc7.30 - xMate ver. 1.15.3 - PellesC
Post Reply