Windows - Batch Obfuscated Stager

Поделиться
HTML-код
  • Опубликовано: 2 ноя 2020
  • To help support me, check out Kite! Kite is a coding assistant that helps you faster, on any IDE offer smart completions and documentation. www.kite.com/get-kite/?... (disclaimer, affiliate link) Hang with our community on Discord! johnhammond.org/discord
    If you would like to support me, please like, comment & subscribe, and check me out on Patreon: / johnhammond010
    E-mail: johnhammond010@gmail.com
    PayPal: paypal.me/johnhammond010
    GitHub: github.com/JohnHammond
    Site: www.johnhammond.org
    Twitter: / _johnhammond

Комментарии • 118

  • @gromit7073
    @gromit7073 3 года назад +22

    I hate when my system knows that I'm about to run calculator... Thanks John

  • @user-vq6be2cd8y
    @user-vq6be2cd8y 3 года назад +21

    RUclips recommend this more! This is so good content! Make this handsome man have the BEST Channel please!

  • @XiSparks
    @XiSparks 3 года назад +3

    I'm pumped for this! I love new John Hammond videos!

  • @notagamer32
    @notagamer32 3 года назад

    I discovered you a few weeks ago from another person and HAVE to agree you are just awesome man. I love your videos keep em coming Imma learn everything I can

  • @thengakola6217
    @thengakola6217 3 года назад +57

    hey john ...... do u think we get uncomfortable when u get an error?...... please no...we wanna see the errors and honestly, you are the only youtuber i know who shows the errors and solves that infront of us... and i think thats awesome..... anyway , nice video

    • @CZghost
      @CZghost 3 года назад +4

      I wouldn't say "the only" 'cause there are others, but I would definitely say "one of the few". 'Cause most people seem to be embarrased by their own failures.

  • @ibnsaltus
    @ibnsaltus 3 года назад +1

    love your work John, please keep it up and never stop

  • @ARZ10198
    @ARZ10198 3 года назад +59

    Commenting for youtube's algorithm thing xD

  • @tydewalt5425
    @tydewalt5425 3 года назад +8

    Just clicking around on security websites and found this. Super interesting. I want more. Subscribed.

    • @DaxyGamer
      @DaxyGamer Год назад

      you mean security forums?

  • @nikolas8741
    @nikolas8741 3 года назад +1

    Best video ever! Much appreciated you do a great job explaining 🧡

  • @envdev
    @envdev 3 года назад +3

    Awesome work. This taught me so much . Thank you.

  • @highvisibilityraincoat
    @highvisibilityraincoat 3 года назад +1

    Keep up the great work John!

  • @blinking_dodo
    @blinking_dodo 3 года назад +6

    Wait until he discovers he can re-assign variables that are already used to mess with the brains of whoever is trying to decode it...
    triple layer recursion with intertwining variables...
    That is going to be fun...
    now i really want to make a obvusbat generator that does that...

  • @octagear
    @octagear 3 года назад +4

    It was fun to listen for the first minutes, program the entire thing in python on my own and then see what you've come up with ^^'

  • @thecaretaker0007
    @thecaretaker0007 3 года назад +1

    Love your work

  • @Stronkus
    @Stronkus 3 года назад +1

    Keep up the good work man!

  • @NiklausonNA97
    @NiklausonNA97 3 года назад +1

    Loved this video! Commenting so I get more of this :) Thanks!

  • @badassmusiccollections5422
    @badassmusiccollections5422 3 года назад +3

    I really thought of this once but never got time to make it work.
    Am really happy that you turned that concept to real thing

  • @il3968
    @il3968 Год назад +1

    Fucking amazing man… you just gave me great ideas on how to obfuscate my batch file. You are fucking underrated you need more subs man.

  • @patrickshepherd1341
    @patrickshepherd1341 Год назад +1

    He was an obfusk8r boi, he said see ya later boi.

  • @navneetmann1411
    @navneetmann1411 3 года назад +3

    Deserves much more views

  • @hydejel3647
    @hydejel3647 3 года назад

    I love this video!

  • @Zaakipaladin
    @Zaakipaladin 3 года назад

    Great explanation!

  • @piolix0004
    @piolix0004 3 года назад +4

    That was really quite fun to watch lmao

  • @Klausi-uq4xq
    @Klausi-uq4xq 3 года назад

    Nice Work!

  • @rootshell101
    @rootshell101 3 года назад +3

    You can show the idea of the code and steps in Microsoft OneNote because some people prefer that way to understand. Just a little to make the video more awsome :'D

  • @zgeekdiver
    @zgeekdiver 3 года назад

    LOVE YOU MORE! :-D

  • @dabla8479
    @dabla8479 3 года назад +8

    as you might notice... the last line in your output always claims about the "|". You cannot set pipe to a variable this way ;)

  • @Nobody2day553
    @Nobody2day553 3 года назад

    Oh nice. What a perfect time to take lunch.

  • @1981bbrad
    @1981bbrad 3 года назад +1

    @John Hammond Awesome work man! I'm a Sec / Infrastructure engineer based in Perth Australia and your videos have always been entertaining / informative. Will you make this python code available on GIT? i'd love to mess with it more and see what additions i could come up with - cheers man Greetings from Perth

  • @imofo
    @imofo 3 года назад

    The best 💕

  • @GUMMYITALIAN
    @GUMMYITALIAN 3 года назад +1

    I watch these videos like a dog trying to understand physics in hopes that one day I'll be able to understand this shit. 😭

  • @slonkazoid
    @slonkazoid 3 года назад +30

    this is how my unobfuscated code looks

    • @svampebob007
      @svampebob007 3 года назад +4

      yeah, except my code also just returns syntax errors

    • @mr.picklesworth
      @mr.picklesworth 3 года назад +1

      I'm still trying to just get my text editor to scroll the code I'm writing to the middle of the screen. Getting really tired of wiggling code right at the bottom of the monitor. If I don't figure it out soon I might have to activate window because it's a really pain in the ass trying to read text over top the activate windows water mark 😋

    • @slonkazoid
      @slonkazoid 3 года назад

      @@mr.picklesworth imagine needing to pay for an operating system.
      use linux

    • @mr.picklesworth
      @mr.picklesworth 3 года назад

      Thats the funny part. I am running linux mint on a vm and use it most of the time. I would only use Linux but then I can't play certain games with my kid. Sadly there are still a few things that can only be done on windows otherwise I would only run Linux.

    • @CatchMyThrowingKnife
      @CatchMyThrowingKnife 3 года назад

      Dualboot your bootloader

  • @wanderingknight10
    @wanderingknight10 2 года назад

    Exactly how it is when your experimenting.. “Did it execute?! Yes!!!!

  • @worm6942
    @worm6942 3 года назад +2

    Can you do a video on what you would recommend to someone just starting out in cybersecurity to help them learn? Or a video on what you resources you used to get to your level of knowledge?

  • @markgentry8675
    @markgentry8675 3 года назад

    I was definitely not as excited as you about that LOL. I love your excitement tho you should be an actor 😂
    oh and please call it cmd not batch. just like we call it bash because /bin/bash. batch is a cmd script. also set is a command 😂

  • @jvcss
    @jvcss 2 года назад

    awesome!!!!!!!!!!!!!!!!!!!!!!

  • @wanderingknight10
    @wanderingknight10 2 года назад

    👍 nice!!!

  • @jeffarends8843
    @jeffarends8843 3 года назад +1

    I kind of love how evil it is to use modular arithmetic (%) with all the other %'s floating around

  • @DarkBloodLP
    @DarkBloodLP 3 года назад +2

    Interesting concept, but i think you should take it a bit further. Im considering doing it my self in java. I think, it‘s more effective by doing it on a character base, even for the set.

  • @sethadkins546
    @sethadkins546 3 года назад +8

    5:38 Someone's a little too used to Linux...

  • @manucaouette
    @manucaouette 3 года назад +1

    If you want to include all characters, use quotes: set "idofjwkodif=%=exitcodeAscii%". No need to add bad_chars.
    Python string (in create_variable): return f"{set_operator}%%{space_character}%\"{varname}%{equals_character}%{value}\""

  • @maykonandradeschier296
    @maykonandradeschier296 3 года назад +1

    stupid algorithim you deserve more viewers

  • @Lars-ce4rd
    @Lars-ce4rd 3 года назад

    Every programmer: OK, so then you just run it... oh something broke

  • @hatkidchan_
    @hatkidchan_ 3 года назад +6

    I've instantly found that mistake: hat character (^) is used as escape character in windows. Like backslash on *nix. Windows is weird.

  • @custume
    @custume 3 года назад

    well this is nice to encrypt stuff

    • @slonkazoid
      @slonkazoid 3 года назад +1

      it's not encryption, it's easily reversable. it's just obfuscation

  • @ecjb1969
    @ecjb1969 2 года назад

    I think it’s the pipe character.

  • @leland818
    @leland818 3 года назад

    Neat

  • @marawanharraz2310
    @marawanharraz2310 3 года назад

    What should I know or study to understand this?

  • @XiSparks
    @XiSparks 3 года назад +2

    The title of this video should be: "Set title='Windows - Batch Obfuscated Stager'" | obfsucator.py

  • @tooru
    @tooru 3 года назад

    naisu

  • @4pThorpy
    @4pThorpy 3 года назад +1

    did anybody else feel upset about not using the %windir% env?

  • @jameselliot9114
    @jameselliot9114 3 года назад

    Hello Algorithm! 👋 please put this in more people's suggestions!

  • @DaBearsManiac2
    @DaBearsManiac2 3 года назад

    I have a dumb question! How did you manage to call your sublime-text text editor from the place where you were?? I would have to be in the folder where my subl.exe is located to actually call it.

  • @sammo7877
    @sammo7877 3 года назад +1

    stuff we have to get back to in our life? ....nope lol

  • @LiEnby
    @LiEnby 3 года назад

    can you upload this obfuscator???

  • @thougts7348
    @thougts7348 3 года назад

    Isn't this concept used by Metasploit Powershell payloads or am I mistaken?

  • @marcocacciatore2602
    @marcocacciatore2602 3 года назад

    can't you escape the special characters with either a backslash or as a single character ('|') or in a string "|"

    • @DePhoegonIsle
      @DePhoegonIsle 3 года назад

      Yep, there is command prompt & batch script escape characters

  • @TheKoalaKids115
    @TheKoalaKids115 3 года назад

    ALGORITHM STUFFS x'D

  • @Anunnaki95
    @Anunnaki95 3 года назад +1

    Which programing languages should learn before using linux, C++, Python, java or JavaScript? 🤔

    • @1.N.Decent
      @1.N.Decent 3 года назад +2

      Bash cli should be the starting point imo

    • @Anunnaki95
      @Anunnaki95 3 года назад

      Thank you

    • @pswalia2u
      @pswalia2u 3 года назад +1

      All

    • @montgomery4340
      @montgomery4340 3 года назад +1

      Bash and c++

    • @slonkazoid
      @slonkazoid 3 года назад

      if you wanna use more complicated distros/WMs, learn a bit of C
      if you wanna learn simple distros/DEs, you don't need to learn anything but most of them use JavaScript to customize things and make widgets.
      first learn bash

  • @kenny-kvibe
    @kenny-kvibe 3 года назад

    my mind === nuclear explosion

  • @mvk658
    @mvk658 3 года назад

    Download link?

  • @valrina
    @valrina 3 года назад

    Pretty sure the problem was the fact you didn't check whether a random was already set...

  • @tommasochiti4237
    @tommasochiti4237 3 года назад

    Well somebody could just use find and replace those weird strings with the ones you provide with all those initial set. But funny video indeed.

    • @_JohnHammond
      @_JohnHammond  3 года назад +2

      Right, or someone could just add an `echo` to the beginner of the line that actually executes whatever "payload". To a human analyst, this is easy. To a machine and automated AV or EDR, maaaaaybe it wouldn't pick up on this. That's the basic idea. Thanks for watching!

  • @DePhoegonIsle
    @DePhoegonIsle 3 года назад +1

    Lol, batch has separate logic for the command prompt & a bat/file execution.

    • @monkey5266
      @monkey5266 3 года назад

      The joy of working with windows.

    • @DePhoegonIsle
      @DePhoegonIsle 3 года назад

      @@monkey5266 yep, but i respect and love it myself

  • @a.k_theportal3085
    @a.k_theportal3085 3 года назад

    Where is the source code for this?

  • @delusionalaar4031
    @delusionalaar4031 3 года назад +1

    Algorithms

  • @cubernetes
    @cubernetes 3 года назад

    37:05 the numbers where majorly different, not just by one, but 100000, you printed a 3 instead of a 2 in the 100K place

    • @_JohnHammond
      @_JohnHammond  3 года назад

      Yeah, I noticed that mishap during the premiere. Bummed I didn't see it while recording the video -- maybe we could amp the number up and make it even higher. Add some more "noise" :P

    • @cubernetes
      @cubernetes 3 года назад

      @@_JohnHammondYeah man that'd be great!

  • @otesunki
    @otesunki 3 года назад

    DUDE
    ITS THE PIPE CHARACTER
    THE BAD COMMAND THING IS A RACE CONDITION

  • @myilmaz002
    @myilmaz002 2 года назад

    Hi John, please put this code on your GitHub.

  • @torsec6048
    @torsec6048 3 года назад

    u r legion

    • @slonkazoid
      @slonkazoid 3 года назад

      what

    • @torsec6048
      @torsec6048 3 года назад

      @@slonkazoid out of ur reach

    • @slonkazoid
      @slonkazoid 3 года назад

      ​@@torsec6048 checked your profile
      No, I have taken actual cyber security training and use GNU+Linux as my daily driver.

  • @CZghost
    @CZghost 3 года назад

    Kind of slow to just start calculator :D

  • @facttrendz1314
    @facttrendz1314 3 года назад

    Sir please make a video on how to download old gnome in Kali Linux 2020

    • @slonkazoid
      @slonkazoid 3 года назад +2

      sir you are not supposed to use kali as a daily driver, it's insecure af

    • @nikolas8741
      @nikolas8741 3 года назад

      Hahahaha Kali switch to Arch power and install black arch tools from their wiki

    • @slonkazoid
      @slonkazoid 3 года назад

      @@nikolas8741 oh god that is even edgier
      as an arch user btw i disapprove of this message

    • @nikolas8741
      @nikolas8741 3 года назад

      @@slonkazoid what do you know that I don't is Arch secure? I am kinda novice should I use Arch for my every day driver?

    • @slonkazoid
      @slonkazoid 3 года назад +1

      @@nikolas8741 I use arch as a playground for extreme things like compiling custom kernels and non-extreme things such as ricing dwm
      So yes, it is good as a daily driver if you wanna explore deeper

  • @Arummekarlayung0706
    @Arummekarlayung0706 3 года назад

    Create some course for us john

  • @custume
    @custume 3 года назад

    brain melting heheheheheheheheh

  • @BuRRak
    @BuRRak 3 года назад +2

    How to bypass obfuscation completely:
    Prepend '@echo on'
    Open in CMD
    See the commands

    • @DePhoegonIsle
      @DePhoegonIsle 3 года назад +3

      You realize that the batch files can disable & enable echo basically on demand.
      Aka meaning that a clever use of the batch file can hide the commands & a batch file done right is stupidly fast and cls can be used frequently enough to make even 200hz captures (aka 200+fps) be unable to even do a frame of it.

  • @SHIVKUMAR-uu1ds
    @SHIVKUMAR-uu1ds 3 года назад

    Sir i like hacking how can i start to learn hacking

    • @deepergodeeper7618
      @deepergodeeper7618 3 года назад +1

      learn python 1st there are lots of free courses online then go from there

  • @_AN203
    @_AN203 3 года назад

    15:52
    what the wut ????

  • @joeslinky
    @joeslinky 2 года назад

    So basically we’re gonna teach people how to write better malware

  • @Zachucks
    @Zachucks 3 года назад

    Does anybody actually register Sublime Text? lmfao

  • @noorhaadi5288
    @noorhaadi5288 3 года назад

    8ii8

  • @4ag2
    @4ag2 3 года назад +1

    1st 🙄