Hello, thanks a lot for the help , is there any way to link the file to the code , what i mean that i have a whole CODE.PY file and i want it to assign it to the variable code instead of copying the whole text
what you can do is read the CODE.py file and make that be the variable. Example: file = open("CODE.py", "r") code = file.read() file.close() and code is your code variable
Hi! I'm sorry if this request is like too basic for your target audience (I'm almost sure it is). Would you consider doing a short video on what code injection exactly is? I serached for a while in Google but the info I found was not very specific or clear at all.
Hi, thank you for this video! I am getting the message "Could not allocate memory for shellcode" while running this using anaconda/jupyter notebooks, do you have any tips on how to bypass this error message?
This is probably because subprocess is trying to read too much memory, replace the line `subprocess.Popen("notepad.exe")` with `os.system("notepad.exe")` Let me know if this worked!
@@JustAnotherCoder Thank you! So the error message is gone but there is no tkinter window that opens. Any suggestions? I'm checking to make sure I have all the right packages properly installed on anaconda, though it looks like I should...
@@tinagoparaju342 Hmm, try with different code then, like write a few lines of code that will create a text file on your desktop and see if anything happens.
@@JustAnotherCoder I decided to go ahead and run this directly through IDLE instead of Jupyter Notebooks to see if it would bring any clarity to the issue and I actually am in fact still getting the message "RuntimeError: Could not allocate memory for shellcode" even when using the os alternative you shared. Seems to still be a memory issue... If you know of any other ways to limit how much memory this program might require, that would be fantastic! Any advice is appreciated. Thanks for all your help thus far!
After playing around with this I'm actually getting this message: " pymem.logger.debug('New thread_id: 0x%08x' % thread_h) TypeError: %x format: an integer is required, not NoneType" any suggestions?
Whenever the application you injected closes the injection disappears also. Since the injection injects itself in the process of the exe that is running not the actual exe. Injecting code into files is something else, might make a video about it soon
I use VSCode when working on projects but I use IDLE for smaller tutorials which require just one file and not a lot of code. IDLE is also actually much better for beginners then VSCode or other IDE's since if just start coding with VSCode then you won't learn anything, everything will be auto complete for you.
its cool i can put a malicieuse code and run it on the explorer so u cant close it or the pc will crash thats so cool now i dont have to bind my trojans !
Yep so injecting as I showed in this video is the most basic type of injection, you can't really modify variables in the app easily. I made another video on game hacking which is very similar to code injection, but instead of injecting code you modify existing code, and it works on any app not just games. Injecting code can be useful if for example you want to add more features to a program, say when you type { in notepad you want it to automatically put another } you can write a quick program and inject it. The more advanced type of code injection is by DLL injection (which only works with C/C++ iirc) which is a harder to do but you can modify variables in the app and it is most useful for making hacks for a games since you can make it be like a modmenu if you know what that is.
@@chadthunderblock5951 Yes it can, depends on how the virus is made though. If it is a python file then you can just copy the code of the file and inject it the same way I inject code in this video. If you want better results you can also try injecting into file explorer so the user can't close the virus at all
It's not really such a big bug, even if they patch it, it will still be possible to inject DLL's into any program which is basically the same thing like injecting code.
Consider donating to help the channel!
Buy me a kofi ko-fi.com/justanothercoder
Patreon patreon.com/justanothercoder
Hello, thanks a lot for the help , is there any way to link the file to the code , what i mean that i have a whole CODE.PY file and i want it to assign it to the variable code instead of copying the whole text
what you can do is read the CODE.py file and make that be the variable.
Example:
file = open("CODE.py", "r")
code = file.read()
file.close()
and code is your code variable
Wait, hold on just one fricking second. In Windows, one process can just access another process's memory space? Good lord that's scary.
Yep, that's how most virus's work, they inject themselves into windows processes.
Wow amazing video, please make more videos about coding I'm definitely subscribing and liking the video
this is all gret but is sadly running in of windows i dont copies, great GNU, thank mas dennis ritchie and stallman for me show the truth
Hey, do you have a clue about how the pattern and Remote pointers work? cannot for the life of me figure it out
Hello mr coder I am a beginner and have some questions? Do I have to learn a lot about python code before using this method?
this channel is good you this future, but please stop windows
Hi! I'm sorry if this request is like too basic for your target audience (I'm almost sure it is). Would you consider doing a short video on what code injection exactly is? I serached for a while in Google but the info I found was not very specific or clear at all.
Sure I'll think about it, I'm not a professional at code injection so I'm not sure how well I can explain it but I'll try!
Join the new discord server here: discord.gg/wXz8GD9ySm
Hi, thank you for this video! I am getting the message "Could not allocate memory for shellcode" while running this using anaconda/jupyter notebooks, do you have any tips on how to bypass this error message?
This is probably because subprocess is trying to read too much memory, replace the line `subprocess.Popen("notepad.exe")` with `os.system("notepad.exe")`
Let me know if this worked!
@@JustAnotherCoder Thank you! So the error message is gone but there is no tkinter window that opens. Any suggestions? I'm checking to make sure I have all the right packages properly installed on anaconda, though it looks like I should...
@@tinagoparaju342 Hmm, try with different code then, like write a few lines of code that will create a text file on your desktop and see if anything happens.
@@JustAnotherCoder I decided to go ahead and run this directly through IDLE instead of Jupyter Notebooks to see if it would bring any clarity to the issue and I actually am in fact still getting the message "RuntimeError: Could not allocate memory for shellcode" even when using the os alternative you shared. Seems to still be a memory issue... If you know of any other ways to limit how much memory this program might require, that would be fantastic! Any advice is appreciated. Thanks for all your help thus far!
After playing around with this I'm actually getting this message: " pymem.logger.debug('New thread_id: 0x%08x' % thread_h)
TypeError: %x format: an integer is required, not NoneType" any suggestions?
Is there a way to undo the injection or is it permanently part of the .exe?
Whenever the application you injected closes the injection disappears also. Since the injection injects itself in the process of the exe that is running not the actual exe. Injecting code into files is something else, might make a video about it soon
Quick question is it persistent?
no lol, it only injects into volatile memory
what is the editor you use?
The editor which I use in the video is IDLE, it comes with the python installation.
ohhhhh realy iteresting this module hehe
How to inject batch script into pdf ?
can you help i am getting this error "TypeError: %x format: an integer is required, not NoneType"
yea same
me three
imagine using IDLE
I use VSCode when working on projects but I use IDLE for smaller tutorials which require just one file and not a lot of code. IDLE is also actually much better for beginners then VSCode or other IDE's since if just start coding with VSCode then you won't learn anything, everything will be auto complete for you.
its cool i can put a malicieuse code and run it on the explorer so u cant close it or the pc will crash thats so cool now i dont have to bind my trojans !
I mean... yeah that's a way you can use it
@@JustAnotherCoder its the coolest way thb :p
gr8
thx very much
i am new to python and all the hacking can you explain to me what are the benefits of injection,
thnx.
Yep so injecting as I showed in this video is the most basic type of injection, you can't really modify variables in the app easily.
I made another video on game hacking which is very similar to code injection, but instead of injecting code you modify existing code, and it works on any app not just games.
Injecting code can be useful if for example you want to add more features to a program, say when you type { in notepad you want it to automatically put another } you can write a quick program and inject it. The more advanced type of code injection is by DLL injection (which only works with C/C++ iirc) which is a harder to do but you can modify variables in the app and it is most useful for making hacks for a games since you can make it be like a modmenu if you know what that is.
@@JustAnotherCoder can injection be used to inject a virus if so, how can it be done
@@chadthunderblock5951 Yes it can, depends on how the virus is made though. If it is a python file then you can just copy the code of the file and inject it the same way I inject code in this video. If you want better results you can also try injecting into file explorer so the user can't close the virus at all
@@JustAnotherCoder thnx
i somehow cant get the code running anny sugestions for the error
for me the program works but then it exists without running the injected code and says that there's an error
@@user-xf7mu7ub9d yeah the same happened to me
@@ApfelbaumOhneBirne @M what does the error say if there is an error?
This is so cool!!!!!! Subbed :D
Thanks!
Great video but have you or anyone else reported this to Microsoft?? Seems like a security flaw or bug maybe???
It's not really such a big bug, even if they patch it, it will still be possible to inject DLL's into any program which is basically the same thing like injecting code.
discord or telegram ?
My discord is n0#2180