Injecting Code into Notepad with Python [Ethical Hacking]

Поділитися
Вставка
  • Опубліковано 1 жов 2024

КОМЕНТАРІ • 63

  • @JustAnotherCoder
    @JustAnotherCoder  Місяць тому

    Consider donating to help the channel!
    Buy me a kofi ko-fi.com/justanothercoder
    Patreon patreon.com/justanothercoder

  • @DyiiFeral
    @DyiiFeral 3 роки тому +5

    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

    • @JustAnotherCoder
      @JustAnotherCoder  3 роки тому +2

      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

  • @donalddade5643
    @donalddade5643 2 роки тому +2

    Wait, hold on just one fricking second. In Windows, one process can just access another process's memory space? Good lord that's scary.

    • @JustAnotherCoder
      @JustAnotherCoder  2 роки тому +2

      Yep, that's how most virus's work, they inject themselves into windows processes.

  • @googleisbad
    @googleisbad 2 роки тому +2

    Wow amazing video, please make more videos about coding I'm definitely subscribing and liking the video

  • @rigoni3381
    @rigoni3381 Рік тому

    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

  • @AlyceIsFree
    @AlyceIsFree 2 роки тому +1

    Hey, do you have a clue about how the pattern and Remote pointers work? cannot for the life of me figure it out

  • @sertanpro9194
    @sertanpro9194 2 роки тому +1

    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?

  • @rigoni3381
    @rigoni3381 Рік тому

    this channel is good you this future, but please stop windows

  • @koroviev8897
    @koroviev8897 2 роки тому +2

    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.

    • @JustAnotherCoder
      @JustAnotherCoder  2 роки тому +4

      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!

  • @JustAnotherCoder
    @JustAnotherCoder  2 роки тому +3

    Join the new discord server here: discord.gg/wXz8GD9ySm

  • @tinagoparaju342
    @tinagoparaju342 3 роки тому +6

    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?

    • @JustAnotherCoder
      @JustAnotherCoder  3 роки тому +1

      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!

    • @tinagoparaju342
      @tinagoparaju342 3 роки тому

      ​@@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...

    • @JustAnotherCoder
      @JustAnotherCoder  3 роки тому

      @@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.

    • @tinagoparaju342
      @tinagoparaju342 3 роки тому

      @@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!

    • @tinagoparaju342
      @tinagoparaju342 3 роки тому

      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?

  • @ElectroRestore
    @ElectroRestore 3 роки тому +2

    Is there a way to undo the injection or is it permanently part of the .exe?

    • @JustAnotherCoder
      @JustAnotherCoder  3 роки тому +6

      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

  • @googleisbad
    @googleisbad 2 роки тому +1

    Quick question is it persistent?

    • @amboXD
      @amboXD 6 місяців тому

      no lol, it only injects into volatile memory

  • @8legged
    @8legged 2 роки тому +1

    what is the editor you use?

    • @JustAnotherCoder
      @JustAnotherCoder  2 роки тому +1

      The editor which I use in the video is IDLE, it comes with the python installation.

  • @zauzauzi6711
    @zauzauzi6711 2 роки тому

    ohhhhh realy iteresting this module hehe

  • @fwiii1831
    @fwiii1831 2 роки тому

    How to inject batch script into pdf ?

  • @AlexWitton
    @AlexWitton 2 роки тому

    can you help i am getting this error "TypeError: %x format: an integer is required, not NoneType"

  • @ari_archer
    @ari_archer 2 роки тому +1

    imagine using IDLE

    • @JustAnotherCoder
      @JustAnotherCoder  2 роки тому

      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.

  • @tunisiansmakingmoney3232
    @tunisiansmakingmoney3232 2 роки тому

    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 !

  • @simantmohan
    @simantmohan 2 роки тому

    gr8

  • @gigel623
    @gigel623 3 роки тому

    thx very much

  • @chadthunderblock5951
    @chadthunderblock5951 2 роки тому

    i am new to python and all the hacking can you explain to me what are the benefits of injection,
    thnx.

    • @JustAnotherCoder
      @JustAnotherCoder  2 роки тому +1

      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
      @chadthunderblock5951 2 роки тому

      @@JustAnotherCoder can injection be used to inject a virus if so, how can it be done

    • @JustAnotherCoder
      @JustAnotherCoder  2 роки тому +1

      @@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

    • @chadthunderblock5951
      @chadthunderblock5951 2 роки тому

      @@JustAnotherCoder thnx

  • @ApfelbaumOhneBirne
    @ApfelbaumOhneBirne 2 роки тому

    i somehow cant get the code running anny sugestions for the error

    • @user-xf7mu7ub9d
      @user-xf7mu7ub9d 2 роки тому

      for me the program works but then it exists without running the injected code and says that there's an error

    • @ApfelbaumOhneBirne
      @ApfelbaumOhneBirne 2 роки тому

      @@user-xf7mu7ub9d yeah the same happened to me

    • @JustAnotherCoder
      @JustAnotherCoder  2 роки тому

      @@ApfelbaumOhneBirne ​ @M what does the error say if there is an error?

  • @EpicVideoGamer7771
    @EpicVideoGamer7771 3 роки тому

    This is so cool!!!!!! Subbed :D

  • @ThePowerRanger
    @ThePowerRanger 2 роки тому

    Great video but have you or anyone else reported this to Microsoft?? Seems like a security flaw or bug maybe???

    • @JustAnotherCoder
      @JustAnotherCoder  2 роки тому +3

      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.

  • @scb1337
    @scb1337 3 роки тому

    discord or telegram ?