|
Is it possible to make a trojan with code progject???
I mean is it possible to make a trojan with VC++
|
|
|
|
|
|
yea its very well possible, i made one of my own, its crappy though and uses MFC. The beauty about ur own trojan is that virusscanners don't detect it as one (as long as it doesn't get widespread)
Kuniva
--------------------------------------------
|
|
|
|
|
OH ok, Thats pretty cool that you could make a RAT, I heard is better making RAT in delphi??? but i like MS vC++ better I want to make a nice one is there any tuts on making a trojan on C++?? if there are please post the link
Thankz in advance
th3kill3r
|
|
|
|
|
i don't know any tuts on making one, i think most people just make them up, and there isn't like a base model for a RAT because the functions differ from file transmissions to showing/hiding the startbutton lol (which is really stupid according to me btw)
I would suggest u pick up on winsock programming first, u need to know how to program asynchronous sockets as well as blocking sockets, u can find all the info u need at the winsock programmers faq, just type that in in altavista and u'll get there, they have some samples, this is without mfc though, but its the best way to learn.
The problem these days though are firewalls and shared connections and getting the ip since messengers use a central server u cant get the ip as easily. So what i did with mine was when the RAT ran it logs in to a public chat server (like irc for example, but mine doesnt use IRC allthough it should be possible i guess). Then when the RAT is running, u'll know cause u see the nick is logged into the chat, and u can also get the ip through the chat, so u can try and direct connect, however if there's a firewall u wont be able to and u would need a direct connection to transmit files. But i also thought of that too, and its fairly simple, u just make it so that the RAT listens on the chat for commands, so u can give it commands through the chat, u could even make it so that it would only take commands from a certain chat user so other people wont take advantage. My RAT for instance has a function to download files from the web, so if i want a file on the target computer but i cant direct conect, i just upload the file to my webspace, and give the command through the chat to download that file. The other way around is possible as well, u give a command to upload a file to webspace, of course this involves ur password and login being in ur trojan, so i suggest encrypting ur code or use free webspace so that when ur trojan gets into wise hands they dont run away with ur webspace lol.
Anyways, i hope that helped, maybe i'll write a tut about making a RAT one day
Kuniva
--------------------------------------------
|
|
|
|
|
I found this short description about SSL:
You enter a URL such as https://www.mysite.com in your browser window. The https indicates that you want your browser to initiate a secure session with the server
The server responds by sending the site's certificate
The browser checks the certificate information for validity
The browser then creates a session key, which is encrypted with the server's public key, and sends it to the server
The server then decrypts this information using it's private key
Both the browser and server are now using the same secret session key, and the little lock icon will appear on your browser window. All further information sent between the browser and the server will be automatically encrypted, as long as you continue using the https:// protocol.
-----------------------------
whats the private key?? i mean, ur browser generates a session key, its encrypted with a servers public key, but for ur browser to get a public key, it would have to be sent over the network too right? so if that is intercepted, and u encrypt ur session key and send it, and someone intercepts that too, they can decrypt ur session key right? because they already intercepted the public key or they are able to get it (if its static). So i'm guessing the mystery is in the private key, allthough i don't see how it can be different from the public key, i don't seem to understand. Because if the private key is different from the public key, the server will not decrypt it into the same session key as ur browser generated right?
Could anyone clarify this?
Thank you
Kuniva
--------------------------------------------
|
|
|
|
|
A public-private key pair works as follows.
What you encrypt using the public key can only be decrypted using the private key.
And what you encrypt using the private key can only be decrypted using the public key.
Thus you sign using your private key, because people can verify that this is actually you, by decryping the signature using the publicly available public key.
And when you want to send confidential info to the server you encrypt the data using the public key. Now the data can only be decrypted at the server because only they have the private key.
It is nearly impossible to figure out the private key given a public key. Perhaps if you run a brute forcer on a super computer for a few 1000 years you might crack it.
Regards,
Nish
"I'm a bit bored at the moment so I'm thinking about writing a new programming language" - Colin Davies
My book :- Summer Love and Some more Cricket [New Win]
Review by Shog9 Click here for review[NW]
|
|
|
|
|
Ahh thanks a lot! i get it now
pretty nifty
Kuniva
--------------------------------------------
|
|
|
|
|
Kuniva wrote:
whats the private key?? i mean, ur browser generates a session key, its encrypted with a servers public key, but for ur browser to get a public key, it would have to be sent over the network too right?
SSL doesn't need private client keys. Session encryption uses symmetric cryptography - 3DES/AES/RC4. It works this way (simplified):
Clients asks server public key
Client generates symmetric session key, encrypts it with server public key and sends it
Now, the clients know the key because it made and server decrypted it.
For more, read my seminar on SSL at http://www.cs.tau.ac.il/~gartsma/websec.ppt[^]
|
|
|
|
|
I am trying to convert an image, which is bmp into a jpeg. With the use of the Image class from GDI+ i can convert this into jpeg with out any real problem, but at the moment i am passing a filepath to the image class, what i would really like to do is Pass the IStream into the constructor.
The reason for this is because i am using a method on directX to get back a bitmap, and at the mo i am having to save it to file before i can passit to the image class, if i could pass the IStream I would be able to do the covertion much faster with out creating an unecessary file.
Any help would be great..
|
|
|
|
|
this is a code I used to load a PNG image stored in the resources using Bitmap class and IStream, hope it could help you
HGLOBAL hGlb = NULL;
HRSRC hRs =
FindResource(AfxGetInstanceHandle(), MAKEINTRESOURCE(nID), "RT_PNG");
if(hRs)
{
ULONG size = SizeofResource(AfxGetInstanceHandle(), hRs);
hGlb = LoadResource(AfxGetInstanceHandle(), hRs);
HGLOBAL hStream;
void * pData, *pData2;
pData = LockResource(hGlb);
hStream = GlobalAlloc(GMEM_NODISCARD | GMEM_MOVEABLE, size);
IStream *ptrStream;
hr = CreateStreamOnHGlobal(hStream, true, &ptrStream);
ULONG dummy;
ptrStream->Write(pData, size, &dumm);
UnlockResource(hGlb);
m_ptrBm = Bitmap::FromStream(ptrStream);
ptrStream->Release();
}
else
{
int i = GetLastError();
return;
}
the PNG image resource is a full PNG image file just stored in the memory.
|
|
|
|
|
Hi,
I am trying to manipulate a List Control at the cell level, trying to have let's say different cell width and heights in the same row.
Can this be done, or does anyone know how to do it?
THanks in advance.
|
|
|
|
|
I encountered same prob a year ago. I don't think there's a way. I also needed to use different fonts for each cell. Best bet is to use third party windows, i.e. grid controls etc.
You can easily modify the width of each cell independently of each other though.
|
|
|
|
|
Yes, you can control all aspects of the painting of each "cell" in a list view (reportmode). You need to use the LVS_OWNERDRAWFIXED style when creating it. Then, in your DrawItem handler, either call the default method for cells you are not interested in custom drawing, and paint the cell yourself for those that you want to control. See LVS_OWNERDRAWFIXED in the doc.
|
|
|
|
|
For example, there are typically 3 buttons on a window's title bar: "minimize", "maximize" and "close". Now if I hate the rectangular image of the "maximize" button and want to change it to, say, a circle, or simply I want to add an additional button to the title bar, is that possible? Thanks a lot.
|
|
|
|
|
The only way that I know of to do this is to trap the WM_NCPAINT and do one of two things:
1) call the default handler and then paint over the [X] button with your own widget
2) take total control over painting the window frame yourself.
|
|
|
|
|
1) Very easy for Dialogs
2) Pain in the a** for SDI/MDI apps.
I wasted two weeks to implement skining SDI(MDI), custom buttons + var size caption. Trouble is MFC 4x paint those buttons outside of NC_PAINT. If your buttons smaller than standard buy some preparetionH.
Brian
|
|
|
|
|
Could you please post some details on how to do so on a CDialog? Thanks.
|
|
|
|
|
Hi,
how did you solve the problem with maximized MDI childs ? I'm trying to add another button to the title bar but I don't know how to do it when it's maximized.
Ciao Matthias Mann
|
|
|
|
|
I beleive I saw an article on codeproject about adding anouther button to the title bar, sorry I do not remeber what it for. If you can find it then you may have most of your solution.
Trust in the code Luke. Yea right!
|
|
|
|
|
Here is a error throw out when debug my program.
I know this question was asked for many times!
And I have search it and seen it.
I use several method which I get from web .
I select Edit==>Breakpoints And find none breakpoint there!
And I ReSetup a new project with same name .
copy all .h .cpp .rc files into the new project.
but the error throwed out yet!
I don't know why!
each time when the error occured,it stoped at
NTDLL! 77f9180c()
there are a part of code as follow:
<br />
m_pStillImage=new CxImage();<br />
if(m_pStillImage==NULL)<br />
return false;<br />
if(!m_pStillImage->Load(strFilePathName,ExtType))<br />
{<br />
return false;<br />
}<br />
........
if((m_TotalFrame=m_pStillImage->GetNumFrames())>1)<br />
{<br />
m_MoviePicDelay=m_pStillImage->GetFrameDelay();<br />
m_pMovieImage=new CxImage[m_TotalFrame];<br />
for(int i=0;i<m_TotalFrame;i++)<br />
{ <br />
m_pMovieImage[i].SetFrame(i);<br />
m_pMovieImage[i].Load(strFilePathName,ExtType);<br />
}<br />
if(m_pStillImage)<br />
{<br />
delete m_pStillImage;<br />
<big>
m_pStillImage=NULL;<br />
} <br />
}<br />
anybody!please help me!
Don't look at me in that way!
|
|
|
|
|
Try:-
1. looking at the call stack when the error occurs
2. m_pStillImage->Destroy() before delete m_pStillImage
3. CxImage m_StillImage instead, if this fails then you probably have something like a memory overwrite, use of an invalid pointer etc. in some part of your code
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
Hi
Can anyone explain to me how to define and implement callbacks in C? Just briefly. I'll get along from there
Thanks
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
OK i figured it out myself
Just one question, how do I define the callback properly, as both the folowwing gives the same results:
typedef int (SCCB)(char** suggest, int size);
or
typedef int (*SCCB)(char** suggest, int size);
Help appreciated
I rated this article 2 by mistake. It deserves more. I wanted to get to the second page... - vjedlicka 3:33 25 Nov '02
|
|
|
|
|
You are declaring a POINTER to a FUNCTION, so the correct syntax is:
typedef int (*SCCB)(char** suggest, int size);
-Dominik
_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do??
|
|
|
|