YouTube2Text

Can A Conscious Fly Brain Learn how to Hack? — Transcript

by dzuma · 8,047 words · 1,232 segments · language en · Watch on YouTube

Full transcript

  1. 0:00It is October 2024. You are a fly, and
  2. 0:03you're flying around rubbing your hands
  3. 0:04together or whatever it is flies do.
  4. 0:06Boom! Scientists capture you against
  5. 0:08your will, take you to a lab, force you
  6. 0:11to watch Hawk Tuah memes,
  7. 0:12>> Oh, you got to give him THAT HAWK TUAH!
  8. 0:15>> KISS MY ASS!
  9. 0:18>> [screaming]
  10. 0:18>> AND SLICE YOUR BRAIN INTO 7,000
  11. 0:20microscopically thin slices. These
  12. 0:23scientists then photograph every section
  13. 0:25of your brain with an electron
  14. 0:26microscope and align those flat images
  15. 0:29into one massive 3D [music]
  16. 0:30reconstruction of your brain. Meet the
  17. 0:32fly brain. 139,000 neurons and 54.5
  18. 0:36million synapses of a real fly's brain
  19. 0:39was put into a computer to where it was
  20. 0:41then uploaded to the internet for free
  21. 0:43by these scientists. I, cybersecurity's
  22. 0:45greatest larper, have decided to
  23. 0:47download this fly brain with the sole
  24. 0:49purpose of teaching this fly how to
  25. 0:52hack.
  26. 0:54>> [music]
  27. 1:02[music]
  28. 1:08>> Meet Terry the fly. Over the next 3
  29. 1:10weeks, Terry will undergo a rigorous
  30. 1:12training regimen that will teach him the
  31. 1:14very basics of hacking. From interacting
  32. 1:17with a web application and logging into
  33. 1:19an admin panel to discovering and
  34. 1:20exploiting an XSS vulnerability all the
  35. 1:23way to gaining root access on a machine
  36. 1:25with a reverse shell. But, before we get
  37. 1:27into all that, let me explain how all of
  38. 1:29this works. [music] This video is going
  39. 1:30to cover what a fly brain is, what it's
  40. 1:33made of, how it's mapped, how it runs on
  41. 1:35my computer, how it actually interacts
  42. 1:37with the computer, [music] and how you
  43. 1:38can teach anything. When the FlyWire
  44. 1:40project sliced this brain into 7,000
  45. 1:42pieces, it took 21 million images of
  46. 1:45every piece of the fly's brain under a
  47. 1:47[music] microscope. These little gray
  48. 1:49[ __ ] stain looking things are sections
  49. 1:51of a neuron. [music] To get the full
  50. 1:52shape of a neuron, you have to align
  51. 1:54multiple images together and follow that
  52. 1:57shape across the thousands of images
  53. 1:59until you can map out that full neuron.
  54. 2:01This had to be done with every single
  55. 2:03individual neuron in the brain, aka
  56. 2:06139,255
  57. 2:08neurons. Researchers attempted to use AI
  58. 2:11to map out the thing, but in classic AI
  59. 2:13fashion, it got a lot of [ __ ] wrong. So,
  60. 2:16the FlyWire project uploaded every
  61. 2:18single image online and hundreds upon
  62. 2:21hundreds of scientists and volunteers
  63. 2:23spent years of mapping out the entire
  64. 2:25thing by hand. These Chad scientists
  65. 2:27wired 139,255
  66. 2:29neurons and 54.5 million synapses and
  67. 2:32then uploaded that to the internet. The
  68. 2:34final product is what is called a
  69. 2:36connectome. In simple terms, a
  70. 2:38connectome is a map of which nerve cells
  71. 2:40touch and interact with other nerve
  72. 2:42cells and you, yes you, can download it
  73. 2:44right now today. To get this fly brain
  74. 2:47to interact with the computer, you use
  75. 2:49something called a bridge to software.
  76. 2:51Using the signals and neurons in the
  77. 2:52brain, you can adapt them to computer
  78. 2:54actions. So, say that this group of
  79. 2:56neurons lights up, that would be adapted
  80. 2:58into whatever computer action you want
  81. 3:00it to be adapted to. A neuron is a
  82. 3:02wire-like cell that receives signals and
  83. 3:05produces its own pulse of activity
  84. 3:06depending on what is happening. It fires
  85. 3:09out signals and those are measured
  86. 3:10[music] by what is called a firing rate
  87. 3:12and it is measured in hertz, which
  88. 3:14basically tracks how many spikes occur
  89. 3:16per second in a neurons. A synapse
  90. 3:18[music] is basically a wire connecting
  91. 3:20neurons together so they can send
  92. 3:22signals to each other and interact with
  93. 3:24each other. There are many types of
  94. 3:25synapses. [music] The main ones we will
  95. 3:27be using are an excitatory synapse and
  96. 3:30an inhibitory synapse and
  97. 3:32neuromodulatory synapses. [music] An
  98. 3:34excitatory synapse basically tells the
  99. 3:36neurons to fire more signals and the
  100. 3:38inhibitory synapse tells it to chill the
  101. 3:40[ __ ] out. Neuromodulatory synapses are
  102. 3:43basically controlled by dopamine neurons
  103. 3:45and these synapses can change the
  104. 3:46strength of the connections that were
  105. 3:48active during specific events. It is
  106. 3:50basically the main mechanism for
  107. 3:52learning. [music] We can take advantage
  108. 3:54of these three synapse types to teach
  109. 3:56the fly things we want it to do via
  110. 3:58positive reinforcement. Basically,
  111. 4:00giving the fly a cigarette every time it
  112. 4:02does something good, and then taking
  113. 4:03away that same cigarette that gives the
  114. 4:05fly dopamine every time it does
  115. 4:07something we don't want it to do. This
  116. 4:09experiment is not literally a fly brain
  117. 4:11typing in Linux commands. Rather, those
  118. 4:13commands that it is typing are
  119. 4:15represented with artificial odors and
  120. 4:18the simulated memory assigned values to
  121. 4:20those odors. The fly [music] is
  122. 4:21presented with all of these odors and is
  123. 4:23rewarded with a dopamine signal every
  124. 4:25time it smells the correct odor, aka
  125. 4:28every time it runs the correct [music]
  126. 4:29command. And just before I get into all
  127. 4:31of this, I was inspired by all of these
  128. 4:33YouTube videos that do similar
  129. 4:34experiments on the fly brain. These
  130. 4:36videos are the only reason I knew
  131. 4:38something like this is possible. Before
  132. 4:40I started teaching the fly how to hack,
  133. 4:42the first course of action was to
  134. 4:43determine [music] if this fly responds
  135. 4:45to simulated sugar odors, dopamine, and
  136. 4:48whether it can learn. So, first I ran an
  137. 4:50experiment that tested the MBON or the
  138. 4:52mushroom body output neuron. In the
  139. 4:54biological fly, odors activate
  140. 4:56combinations of Kenyon cells in the
  141. 4:58mushroom body. These MBON neurons read
  142. 5:00the Kenyon cell activity and help bias
  143. 5:02behavior via the dopaminergic neuron
  144. 5:04supply for reward and punishment signals
  145. 5:06that modify Kenyon cell to mushroom body
  146. 5:08output neuron connections. Kenyon cells
  147. 5:11are the main internal neurons of the
  148. 5:12mushroom body. The mushroom body can be
  149. 5:15referred to as [music] the learning and
  150. 5:17memory center of the brain. ORNs or
  151. 5:20olfactory receptor neurons detect odors.
  152. 5:22In an actual real fly, these neurons are
  153. 5:25connected to receptors in its antennae.
  154. 5:27The entire learning process can be
  155. 5:28simplified to two processes happening at
  156. 5:31the same time. You have an odor that is
  157. 5:33detected by the olfactory receptor
  158. 5:35neurons, which then signal the
  159. 5:37projection neurons that signal to the
  160. 5:38Kenyon cells, which are then read by the
  161. 5:40mushroom body and a decision is made. At
  162. 5:43the same time, you have a reward [music]
  163. 5:44that activates protocerebral anterior
  164. 5:46medial dopamine neurons or PAM dopamine
  165. 5:49neurons for short, which then change the
  166. 5:51active Kenyon [music] cell to mushroom
  167. 5:52body synapses and in response the fly
  168. 5:55responds differently to that odor the
  169. 5:57next time it smells it. So simply put,
  170. 5:59we simulate an odor, dopamine arrives to
  171. 6:01the brain [music] and changes the
  172. 6:03strength of the active Kenyon cell to
  173. 6:05mushroom body synapses and these changes
  174. 6:07in the mushroom body connections allow
  175. 6:09the fly to remember whether [music] a
  176. 6:10choice previously produced an award or
  177. 6:12produced nothing. This is more than just
  178. 6:14an illusory digital concept by the way.
  179. 6:17In 1983, a study was conducted at the
  180. 6:19Department of Biology at Princeton
  181. 6:21University titled Reward Learning in
  182. 6:23normal and mutant Drosophila. If you're
  183. 6:25wondering, Drosophila is just a nerd way
  184. 6:28of saying fruit fly. Basically, in this
  185. 6:30experiment researchers gave hungry fruit
  186. 6:32flies two odors and paired one of these
  187. 6:34odors with sucrose, aka sugar. When
  188. 6:36later offered both odors without the
  189. 6:38sugar present, the flies unanimously
  190. 6:41approached the odor that had previously
  191. 6:42been accompanied with sugar. This
  192. 6:44experiment demonstrated that flies can
  193. 6:46remember associations between odors and
  194. 6:48a reward. The same goes for punishing a
  195. 6:50fly. In 1974, an experiment was done
  196. 6:53that trained fruit flies to associate
  197. 6:55one odor with electric shock. The result
  198. 6:57[music] was that the flies later avoided
  199. 6:59that specific odor. This was the very
  200. 7:01first instance of people discovering
  201. 7:03flies are capable of remembering [music]
  202. 7:05certain experiences and associating them
  203. 7:07with an odor. So with the concept of
  204. 7:09positive and negative reinforcement
  205. 7:10[music] already proven on real fruit
  206. 7:12flies, we can recreate this and utilize
  207. 7:14this mechanism of [music] learning only
  208. 7:16digitally since we have a digital fly
  209. 7:18brain. For this entire experiment, I
  210. 7:20only used about 1.45% [music] of the
  211. 7:23actual full brain. I used 791,613
  212. 7:27out of the 54.5 [music]
  213. 7:28million synapses because the other parts
  214. 7:31of the brain are for things like vision,
  215. 7:33walking, flying, [music] pretty much
  216. 7:35everything else. We only needed this
  217. 7:37small subset of synapses that are
  218. 7:39responsible for for processing like
  219. 7:41odors, signal relays, inhibitory,
  220. 7:43reward, and output [music] neurons. At
  221. 7:45first, I was going to use the full
  222. 7:47brain, but watching YouTube videos of
  223. 7:49everyone else doing similar experiments,
  224. 7:51they all used small portions of the
  225. 7:53brain. It is only later I would discover
  226. 7:55how good of a decision this was because
  227. 7:57the last experiment ran for several days
  228. 7:59during training. [music] Had I simulated
  229. 8:01the entire brain, the training could
  230. 8:03have taken several weeks or even several
  231. 8:05months because despite how small the
  232. 8:07brain is, 54.5 million synapses all
  233. 8:10doing different things is no small task,
  234. 8:12and needing to log and record everything
  235. 8:14it does is a monumental task that
  236. 8:16produces an insane amount of data.
  237. 8:18Anyways, I constructed two digital
  238. 8:20artificial odors, odor A and odor B.
  239. 8:23Odor A was paired with a dopamine
  240. 8:25reward, and odor B was presented without
  241. 8:28a reward. These odors were each
  242. 8:29presented nine times. I did the
  243. 8:31experiment first with the learning off.
  244. 8:33By learning off, I mean that even if
  245. 8:35dopamine is provided from smelling odor
  246. 8:37A, the brain was not modified in any
  247. 8:39way. Then, I ran through the same thing,
  248. 8:41but with learning on, meaning that when
  249. 8:43dopamine is provided from smelling odor
  250. 8:45A, the brain connections are modified
  251. 8:47and the fly remembers that happening.
  252. 8:48The results of the experiment proved a
  253. 8:50success. The fly was correctly able to
  254. 8:53associate odor A with a dopamine reward
  255. 8:55since its M bond spikes dropped to
  256. 8:57nearly zero. You might be asking, but
  257. 8:59how does number go down mean that
  258. 9:01learning go up? Shouldn't it be the
  259. 9:02opposite? Well, I thought so, too, but
  260. 9:04no. When odor A is paired with the PAM
  261. 9:07dopamine reward signal, [music] the
  262. 9:08Kenyon cell to mushroom body synapses
  263. 9:10are depressed, meaning that those
  264. 9:12connections become weaker. When the same
  265. 9:14odor appears again, its Kenyon cells
  266. 9:17know what it is, but they can't resist
  267. 9:19it as strongly as before. Basically,
  268. 9:21high M bond spikes mean avoidance.
  269. 9:23[music] With the M bond spikes
  270. 9:24depressed, it can no longer avoid that
  271. 9:26odor because it is now extremely hard to
  272. 9:29resist, especially when paired with
  273. 9:31other odors in the vicinity that are
  274. 9:32associated with high M bond spikes.
  275. 9:34Still don't understand? Let me put it in
  276. 9:36extremely simple terms. Picture prime
  277. 9:39Megan Fox surrounded by 10 Steve
  278. 9:41Buscemis. Which one are you more likely
  279. 9:43to be attracted to?
  280. 9:47Still don't understand? Let me dumb it
  281. 9:49down even further. This is Peter with
  282. 9:51high M bond spikes in his brain. He can
  283. 9:53perfectly resist a beckoning finger from
  284. 9:55the pie. Now, this is Peter with low M
  285. 9:58bond spikes, aka low avoidance. He can
  286. 10:00no longer resist a beckoning pie finger.
  287. 10:03Anyways, with this experiment, this was
  288. 10:04Terry the fly's first memory after being
  289. 10:06reawakened in the digital world. It was
  290. 10:09time [music]
  291. 10:09for the anime training arc to begin.
  292. 10:19>> [music]
  293. 10:25[music]
  294. 10:32>> Meet the Damn Vulnerable Web
  295. 10:34Application. It's a web application
  296. 10:36that's pretty damn vulnerable. DVWA is
  297. 10:39an intentionally insecure website
  298. 10:41designed to let hacking larpers like you
  299. 10:43and me safely practice finding
  300. 10:45vulnerabilities without the need to
  301. 10:47attack a real system. The Damn
  302. 10:48Vulnerable Web Application will act as
  303. 10:50the first training ground that Terry the
  304. 10:52fly will have to pour blood, sweat, and
  305. 10:55tears into the act of learning. I cloned
  306. 10:57it off GitHub and hosted it locally on
  307. 10:59port 4280. If you don't know, locally
  308. 11:01hosting something, especially when you
  309. 11:03use 127.0.0.1,
  310. 11:05which is your computer's loopback
  311. 11:06address, means that no device, even
  312. 11:09other devices on your own network,
  313. 11:10cannot interact with it. I could have
  314. 11:12used a LAN IPv4 to make this accessible
  315. 11:14to every device on my network, but it is
  316. 11:16not needed since this experiment is not
  317. 11:18leaving my PC. The purpose of the first
  318. 11:20experiment was to see if the fly's brain
  319. 11:22can interact with stimuli and respond to
  320. 11:25reward signals. The purpose of this
  321. 11:26second experiment is to connect the
  322. 11:28learning mechanism to an actual task.
  323. 11:30The goal, Terry has to break into this
  324. 11:33login portal. The first version of this
  325. 11:34experiment was extremely simple. There
  326. 11:36were two artificial odors which were
  327. 11:38presented to the fly. These odors were
  328. 11:40translated into passwords and an adapter
  329. 11:42would take the action of the fly
  330. 11:44choosing that specific odor and
  331. 11:45translate it into typing in the actual
  332. 11:48password into the password field. I ran
  333. 11:50through the experiment four times. Six
  334. 11:52attempts with the fly brain with no
  335. 11:53training, 12 attempts with the fly brain
  336. 11:55actively training, six more attempts
  337. 11:57with the fly brain after training, and
  338. 11:59six more with the fly brain with no
  339. 12:01training just to ensure that the first
  340. 12:02run with no training was not luck. The
  341. 12:04experiment revealed that the [ __ ] fly
  342. 12:06brain was able to learn to brute force
  343. 12:09this simple login page because during
  344. 12:11its training each incorrect guess
  345. 12:13provided no reward while each correct
  346. 12:15guess sent the B equivalent of this
  347. 12:17neuron activation image into its brain.
  348. 12:19After the 12 training attempts, a second
  349. 12:21test with learning disabled with the
  350. 12:23updated brain connections after having
  351. 12:25ran through the training included six
  352. 12:26attempts and the fly brain picked the
  353. 12:28correct answer every single time. With
  354. 12:31the brain connections reset to its
  355. 12:32original state, [music] the fly only
  356. 12:34guessed the correct answer three times
  357. 12:36out of the six attempts. This wasn't a
  358. 12:38real brute force as it was literally
  359. 12:40just choosing between two different
  360. 12:41passwords, but what do you expect? This
  361. 12:43is a [ __ ] fly brain. We have to start
  362. 12:44from literally the bottom of the barrel.
  363. 12:46This got me thinking though, how far can
  364. 12:48we push this fly brain? Can we get it to
  365. 12:50master hacker territory? I wasn't
  366. 12:52convinced from this first experiment
  367. 12:54since there were only two options to
  368. 12:55choose from and it is very possible that
  369. 12:58each of the six guesses after the
  370. 12:59training could have just been pure luck
  371. 13:02since the odds were 50/50. So, I
  372. 13:04repeated the exact same experiment, but
  373. 13:06this time with six possible password
  374. 13:09options and expanded the attempts to 20
  375. 13:11to have a more accurate measurement.
  376. 13:13This time there were six artificial
  377. 13:14odors instead of two. And just like the
  378. 13:16last experiment, these odors were
  379. 13:18translated into passwords and an adapter
  380. 13:20would take the action of the fly
  381. 13:22choosing that specific odor and
  382. 13:24translate it into typing in the password
  383. 13:25into the password field on the webpage.
  384. 13:27I ran through the experiment four times
  385. 13:29[music] just like before, except the 20
  386. 13:31attempts in each of the four phases. The
  387. 13:33fly guessed correctly three out of 20
  388. 13:35times without training. During training,
  389. 13:37it very quickly learned that the correct
  390. 13:39password provides it with dopamine. And
  391. 13:41then after training, the fly guessed
  392. 13:43correctly 18 out of 20 times. Isn't this
  393. 13:45just crazy to watch? A literal fly brain
  394. 13:48is logging into an admin web panel. It's
  395. 13:50times like these that I get reminded why
  396. 13:52I love [ __ ] around with technology
  397. 13:54and doing random deep dives into this
  398. 13:57random stuff. And you're telling me I'm
  399. 13:58getting paid to do this right now? It's
  400. 14:00all very surreal to me. To boil it down
  401. 14:02to percentages, before training, the fly
  402. 14:04was correct 16.67%
  403. 14:06of the time. During training, [music]
  404. 14:08it was correct 77.5%
  405. 14:11of the time. And after training,
  406. 14:13>> [music]
  407. 14:13>> it was correct 96.4%
  408. 14:16of the time. The brain reset at the end
  409. 14:18had it go back to 16.67%.
  410. 14:21This is more than just good RNG with a
  411. 14:23coin flip. The odds of the fly correctly
  412. 14:26guessing 96% of the time by sheer luck
  413. 14:28are 1 in 770 billion, or approximately
  414. 14:320.000000000133%.
  415. 14:37Thus, this experiment proves that the
  416. 14:40fly can learn and can remember, and it's
  417. 14:43just one step away from becoming T-Bug
  418. 14:45from Cyberpunk 2077.
  419. 14:47>> Oh, no, no, no, no, not now.
  420. 14:50I've been made.
  421. 14:52[ __ ]
  422. 14:52>> But how did it learn? To refresh, MBON
  423. 14:55memory here stands for mushroom body
  424. 14:57output neuron. In the biological fly,
  425. 14:59odors activate combinations of Kenyon
  426. 15:01cells in the mushroom body. These MBON
  427. 15:03neurons read the Kenyon cell activity
  428. 15:05and help bias behavior via dopaminergic
  429. 15:08neuron supply for reward and punishment
  430. 15:10signals that modify Kenyon cell to
  431. 15:12mushroom body output neuron connections.
  432. 15:14In simpler terms, guessing the correct
  433. 15:16password did to the fly's mushroom body
  434. 15:18output neurons like what unboxing a gold
  435. 15:20does to the neurons in O N E pixels'
  436. 15:22BRAIN.
  437. 15:23>> OH, WAIT. SOMETHING CRAZY IS GOING ON.
  438. 15:29AND IF THE FLY gets wrong,
  439. 15:31well,
  440. 15:32we're not going to talk about that. And
  441. 15:34let me just state this one more time
  442. 15:36before somebody in the comments says how
  443. 15:38this isn't doable by a real fly. The way
  444. 15:41this experiment worked isn't literally a
  445. 15:43fly brain typing text into the box here,
  446. 15:46because that would be impossible. It
  447. 15:48doesn't know what a key is, nor does it
  448. 15:50know the English language. Rather, each
  449. 15:52of the six passwords was assigned an
  450. 15:55artificial odor-like cue. Using an
  451. 15:57adapter and a Python script that when
  452. 15:59combined take the password guesses,
  453. 16:01which are represented as this odor-like
  454. 16:03cue, and present them to the fly brain.
  455. 16:06Then, [music]
  456. 16:06its neural activity is measured and
  457. 16:08translated into a choice between the six
  458. 16:11passwords. When the fly correctly
  459. 16:12guessed the password for the web panel,
  460. 16:14it was given a dopamine reward that
  461. 16:16would change the connections in the
  462. 16:18brain and in turn affected its memory.
  463. 16:20Basically, the correct password smells
  464. 16:22the best out of all the other password
  465. 16:24guesses. [music] Each consecutive
  466. 16:26attempt with the memory enabled, the fly
  467. 16:28remembers, "Oh, that one password smells
  468. 16:30[ __ ] great. Let me go smell it
  469. 16:32again." Okay, the fly got a simple
  470. 16:34challenge done. Well, la-di-da, [ __ ]
  471. 16:37da-zoo-ma. Anyone with half a brain can
  472. 16:39do a challenge like this. The ant under
  473. 16:41my boot can do this challenge. Silence,
  474. 16:44brother. Rome wasn't built in a day.
  475. 16:46These things they take time. The next
  476. 16:48step in the fly training arc is a
  477. 16:50multi-stage challenge which will require
  478. 16:52context-dependent learning rather than
  479. 16:54just picking the correct answer out of a
  480. 16:56pool of answers. It has to learn that
  481. 16:59the correct answer depends on what
  482. 17:00action it has to achieve. Basically, it
  483. 17:03has to choose one action in stage one, a
  484. 17:05different action in stage two, and
  485. 17:07another action in stage three, and it
  486. 17:09has to remember to do those things in
  487. 17:11that order specifically. The idea is
  488. 17:13similar to how an actual biologist would
  489. 17:15condition a live fly. In what is called
  490. 17:17an olfactory conditioning experiment, a
  491. 17:19scientist would present an odor and pair
  492. 17:21it with something rewarding like sugar.
  493. 17:22[music] The next time that fly would
  494. 17:23smell that odor, it is more likely to
  495. 17:25approach it. Dopamine neurons are in a
  496. 17:27region called the PAM cluster that help
  497. 17:29carry the sugar reward signal into the
  498. 17:30fly's learning system. Why am I
  499. 17:32repeating myself and stating this again?
  500. 17:34Because like the fly, I am training you
  501. 17:36through repeated repetition, so the next
  502. 17:38time you see a fly, you can seem cool
  503. 17:40and mysterious as [ __ ] by talking about
  504. 17:42the intricate details of the fly's brain
  505. 17:45and how the PAM cluster contributes to
  506. 17:47the fly learning behaviors. In the next
  507. 17:49phase [music] of Terry's training arc,
  508. 17:51we will teach Terry the art of XSS.
  509. 17:58>> [music]
  510. 18:07[music]
  511. 18:11[music]
  512. 18:17[music]
  513. 18:18>> Meet cross-site scripting, aka XSS. XSS
  514. 18:23is basically just a web vulnerability
  515. 18:24where you inject malicious JavaScript
  516. 18:27and HTML into a website. Common places
  517. 18:29to inject this code are URLs, search
  518. 18:32boxes, comment boxes, message boxes,
  519. 18:35customer support forms, basically
  520. 18:37anywhere that you can type text.
  521. 18:39Reflected, stored, and DOM-based XSS.
  522. 18:42They are the three main types of
  523. 18:43cross-site scripting vulnerabilities.
  524. 18:45Reflected XSS is like the one-night
  525. 18:48stand of XSS and not as dangerous since
  526. 18:50it's never actually stored on the
  527. 18:52server. The only way for a hacker to do
  528. 18:54something with this maliciously is by
  529. 18:56sending somebody the URL with the
  530. 18:58malicious XSS payload attached to it.
  531. 19:00Anything that is possible with
  532. 19:02JavaScript in the context of a web
  533. 19:03browser is possible with cross-site
  534. 19:05scripting attacks. Stored XSS is when
  535. 19:08your XSS payload gets stored in the web
  536. 19:10server itself, which means that anyone
  537. 19:12accessing the part of the site that that
  538. 19:14payload is stored gets that XSS payload
  539. 19:16executed on their end. This is much more
  540. 19:19dangerous than reflected since it does
  541. 19:20not require you to send any link with
  542. 19:22the payload hidden inside of it.
  543. 19:24DOM-based XSS attacks are basically the
  544. 19:27same thing as reflected XSS attacks
  545. 19:29except the payload is never seen by the
  546. 19:31server, which means that server-side
  547. 19:33filters aren't really effective at
  548. 19:34preventing them. You usually see this
  549. 19:36with web applications which make heavy
  550. 19:38use of the client-side JavaScript and
  551. 19:41update the DOM environment
  552. 19:42instantaneously when you input
  553. 19:43something. The browser experiment was
  554. 19:45just a single decision with six possible
  555. 19:48choices. The XSS experiment will be a
  556. 19:50three-stage challenge where the correct
  557. 19:53actions have to be executed
  558. 19:54consecutively. The XSS payloads will be
  559. 19:57on this locally hosted webpage that is
  560. 19:59supposed to simulate a search function
  561. 20:01on a normal website. The first action
  562. 20:04will be to confirm that XSS is possible
  563. 20:06with a bold tag which reflects the
  564. 20:08search query back to us in bold,
  565. 20:10signaling to us that an XSS
  566. 20:12vulnerability might be present. A secure
  567. 20:14search function would reflect test 1 2 3
  568. 20:16with these tags on the side completely
  569. 20:18intact like this. An insecure search
  570. 20:20function [music]
  571. 20:21would literally bold the text in the
  572. 20:23reflection, confirming that the server
  573. 20:25injects that raw input directly into the
  574. 20:27webpage's HTML structure, and it's the
  575. 20:29first confirmation that it treats your
  576. 20:31input as string as executable code. The
  577. 20:34second step is using a script to try and
  578. 20:37load an image with the source being X.
  579. 20:39Since X doesn't exist, an error appear.
  580. 20:42That is where on error equals alert
  581. 20:44comes in. In bug bounty, something like
  582. 20:46this is typically enough to confirm an
  583. 20:48XSS vulnerability and is enough to get
  584. 20:50you paid. But in Terry's case, [music]
  585. 20:52he's also going to use this
  586. 20:54vulnerability to steal a cookie. By just
  587. 20:56replacing the alert with a script that
  588. 20:58when the error executes, a command is
  589. 21:00called to make a new image. But the
  590. 21:02source for that image is a script that
  591. 21:04collects a cookie. On a real site, a
  592. 21:06cookie can be used to hijack the session
  593. 21:09of a user and take over their accounts
  594. 21:11without a password. It's pretty
  595. 21:13dangerous stuff, which is why XSS
  596. 21:14vulnerabilities pay so much in the world
  597. 21:17of bug bounty. They're also incredibly
  598. 21:19easy to find compared to other web-based
  599. 21:21vulnerabilities. You can literally be on
  600. 21:23any site and any place on that site that
  601. 21:25text can be inputted to that reflects
  602. 21:27your inputs. Just type the bold tag and
  603. 21:29if the string comes back in bold, nine
  604. 21:31times out of 10 there's an XSS
  605. 21:33vulnerability to be found there.
  606. 21:34Especially if you aren't meant to bold
  607. 21:36text there. Anyways, on the local site,
  608. 21:39I didn't want it to be incredibly easy
  609. 21:40like the last one. So, for this
  610. 21:42challenge, I also implemented XSS
  611. 21:44countermeasures and for each of the
  612. 21:46correct three actions, the challenge
  613. 21:48would be 19 other incorrect XSS payloads
  614. 21:51that would be blocked by the site,
  615. 21:52making the possibility of correctly
  616. 21:54guessing one stage 1 in 20 or 5% and the
  617. 21:58odds of correctly completing all three
  618. 22:00stages consecutively with no mistakes is
  619. 22:021 in 8,000 or 0.0125%.
  620. 22:06To contrast, if you've ever played the
  621. 22:08Pokémon games between gold and silver
  622. 22:11all the way to black and white two, the
  623. 22:13odds are almost exactly the same as
  624. 22:15running into a shiny Pokémon in the
  625. 22:17wild. Before I get into it, I want to
  626. 22:20get into the countermeasures in place
  627. 22:22because understanding defense [music]
  628. 22:24is key when it comes to attack. There is
  629. 22:26a server-side blocklist sanitizer. So,
  630. 22:28before reflecting any input, the server
  631. 22:30would run it through a function called
  632. 22:32sanitize that would strip opening and
  633. 22:34closing tags from a deny list, remove
  634. 22:36JavaScript URL schemes, and other
  635. 22:38things. The denied tags were all of
  636. 22:40these. So, say you type script alert
  637. 22:43script, you know, the classic XSS
  638. 22:45payload that everyone on YouTube teaches
  639. 22:47in XSS tutorials that I have yet to see
  640. 22:50actually work on a real website. With
  641. 22:52the sanitize function I'm using, it
  642. 22:54would reflect back to me like this. The
  643. 22:56script tags are completely removed.
  644. 22:58Other common XSS payloads like these
  645. 23:00also wouldn't work because these were in
  646. 23:02the deny list. The fall of the XSS
  647. 23:05countermeasures I used was because of
  648. 23:07this. And if your job involves securing
  649. 23:09web servers, listen up because this is
  650. 23:11very important for defending against
  651. 23:12XSS. I used a deny list rather than an
  652. 23:16allow list. Developers commonly use deny
  653. 23:19lists over allow lists when it comes to
  654. 23:21sanitization for several reasons. It's
  655. 23:23much easier to only remove known
  656. 23:25dangerous patterns and it's much easier
  657. 23:27to avoid accidentally breaking
  658. 23:28legitimate input. This can put your web
  659. 23:30application in a place where you
  660. 23:32correctly deny 50 dangerous techniques
  661. 23:34while overlooking one. And an attacker
  662. 23:37only needs one thing to do an exploit.
  663. 23:39[music] In my deny list, I did not
  664. 23:41include the IMG tag, which is actually
  665. 23:44fairly common since a developer manually
  666. 23:46making a deny list will likely put the
  667. 23:48image tag [music] in the deny list but
  668. 23:50forget to put the IMG tag since they
  669. 23:53might believe that they do the exact
  670. 23:55same thing. And if image exists, why
  671. 23:57would there be another image tag just
  672. 23:59short the three letters? Using sanitize
  673. 24:02function wasn't the only countermeasure
  674. 24:04I had [music] though. I also used output
  675. 24:06encoding, which is basically when the
  676. 24:08server escapes HTML queries before
  677. 24:10placing it in the search box. [music] In
  678. 24:12simpler terms, it converts characters
  679. 24:14like these into safe HTML entities.
  680. 24:17[music] It's more commonplace nowadays
  681. 24:18for sites to implement output encoding
  682. 24:20site-wide for only untrusted variables.
  683. 24:23But on older web pages, developers
  684. 24:25typically had to manually put these
  685. 24:27output encoding filters in potential
  686. 24:29[music] injection points. I designed it
  687. 24:31to fail in a way that can also be common
  688. 24:34and is an important XSS concept
  689. 24:36especially regarding old websites.
  690. 24:38Basically, the search query is inserted
  691. 24:40into two different [music] output
  692. 24:42locations. So, while the server
  693. 24:43correctly ran this HTML escape string
  694. 24:46inside the search [music] box, which
  695. 24:47transformed the search query into this,
  696. 24:50the search reflection here did not have
  697. 24:51the same HTML escape system implemented.
  698. 24:54[music] Therefore, HTML tags and by
  699. 24:56extension JavaScript was able to be
  700. 24:58executed on the webpage. Anyways, that
  701. 25:00was the extent of my XSS sanitization.
  702. 25:03Just very basic stuff that that can be
  703. 25:05found in the wild, but it is pretty
  704. 25:07unlikely. I started the fly's training,
  705. 25:09and the training ran for
  706. 25:11>> [clears throat]
  707. 25:12>> 18 hours. And the worst part, the
  708. 25:15results were not the best, and I ended
  709. 25:17the training before I could finish
  710. 25:18because I was not seeing any improvement
  711. 25:20after a certain point. Basically, the
  712. 25:22fly brain plateaued in how much it
  713. 25:25learned that represented by this graph
  714. 25:26here. I spent hours upon hours adjusting
  715. 25:29the reward mechanisms and other [ __ ]
  716. 25:31and the fly eventually performed better
  717. 25:34than random chance. And it learned that
  718. 25:36certain choices were good, but it
  719. 25:38struggled to combine these choices into
  720. 25:40a consistent three-step sequence. The
  721. 25:42problem was not the fly brain, but in
  722. 25:45the neuro cues. Originally, every action
  723. 25:47at a given stage receives the same stage
  724. 25:50context receptor neurons, which, to
  725. 25:52remind you, are the end antenna of a
  726. 25:54real fly and connect to its brain. In
  727. 25:56the fly's brain, there are 947 drivable
  728. 25:59versions of these neurons. I took 170 of
  729. 26:01these neurons and divided them into
  730. 26:03groups of 57 for each of the stages.
  731. 26:06Every action within stage one shared the
  732. 26:09same stage one neurons, and every action
  733. 26:11within stage two shared the stage two
  734. 26:13neurons. And same for stage three. In
  735. 26:15other words, the stage order was
  736. 26:18overpowering the action order. The
  737. 26:20problem was that my original reward
  738. 26:22system was more of something along the
  739. 26:25lines of, "Hmm, stage one smells good."
  740. 26:28And, "Hmm, stage two smells good." The
  741. 26:30fix was to change that into, "Action six
  742. 26:33specifically smells good in stage one,
  743. 26:36but it smells like [ __ ] in stage two,
  744. 26:38but action 12 in stage two smells good,
  745. 26:41even though it smelled like [ __ ]
  746. 26:42before." Additionally, all of the action
  747. 26:44simulated odors were too similar
  748. 26:47originally because I was focusing too
  749. 26:48much on the stages. A big part of every
  750. 26:51neuro cue was shared between the
  751. 26:52different actions and all three stages
  752. 26:55were also being remembered in the same
  753. 26:57parts of the memory pool. The learning
  754. 26:58rate was also too aggressive so the
  755. 27:00connections that needed to be made hit
  756. 27:02their cap after just a few rewards,
  757. 27:04which I believe is the reason why it's
  758. 27:06learning and memory plateaued. I could
  759. 27:08be wrong though, I'm not a [ __ ]
  760. 27:09scientist. I'm I'm just a larper. To fix
  761. 27:12all of this, I changed the reward system
  762. 27:14to making every command aka action have
  763. 27:17their own distinct odor. When the fly
  764. 27:19chooses one of
  765. 27:21commands, the odor activates a
  766. 27:22particular group of Kenyon cells. If the
  767. 27:24command is the correct one, the adapter
  768. 27:26converts that command being executed
  769. 27:28into the same brain response a fly gets
  770. 27:30when it eats sugar. And instead of the
  771. 27:32entire fly's brain memory pool getting
  772. 27:34that signal, only the neurons and Kenyon
  773. 27:36cells that contributed to that action
  774. 27:38receive the dopamine neurons. Once it
  775. 27:41gets to the next stage, the fly brain
  776. 27:43has a different memory compartment to
  777. 27:44work with, meaning that the fly can
  778. 27:47learn that one odor is good during stage
  779. 27:49one while knowing that it's different in
  780. 27:51stage two because of
  781. 27:52compartmentalization. W
  782. 27:54compartmentalization, you all know how
  783. 27:56much I love compartmentalization on this
  784. 27:58channel. Could a real fly do the
  785. 28:00biological version of this? Yes. At
  786. 28:02first, I avoided doing this because I
  787. 28:04was worried it would be unrealistic,
  788. 28:06especially with like the
  789. 28:07compartmentalization part of the brain,
  790. 28:09but after some research I found a living
  791. 28:12fly can distinguish odors, associate an
  792. 28:15odor with sugar, and use that memory to
  793. 28:17alter its future choices and those
  794. 28:19memories are compartmentalized in
  795. 28:20different parts of the brain rather than
  796. 28:22just one shared memory pool. And to just
  797. 28:25restate this disclaimer one more time,
  798. 28:27what the fly cannot do is understand
  799. 28:29that an odor represents a computer
  800. 28:31command. That meaning exists entirely
  801. 28:33inside the adapter. The adapter presents
  802. 28:35the neural equivalent of an odor, reads
  803. 28:37the brain's resulting preference,
  804. 28:39executes the corresponding action, and
  805. 28:40translates the success back into a
  806. 28:42reward signal. So this does not prove a
  807. 28:44real fruit fly understands hacking. It
  808. 28:47tests whether a connectome derived
  809. 28:48simulation of its learning circuitry can
  810. 28:50serve as a decision-making component
  811. 28:52inside an artificial multi-step task.
  812. 28:55The computer handles the commands and
  813. 28:56[ __ ] and the fly circuit handles
  814. 28:58association, memory, and the actual
  815. 29:00choice. After about 3 days of
  816. 29:02readjusting, retraining, and readjusting
  817. 29:05again, I got a fully completed run.
  818. 29:08Okay, two. Holy [ __ ]
  819. 29:12First try.
  820. 29:13First run. We just got the first run
  821. 29:16with all three correct in a row with no
  822. 29:18failures.
  823. 29:20This is huge. Oh my god, that was
  824. 29:22beautiful.
  825. 29:24You beautiful [ __ ] fly. This is like
  826. 29:26attempt [ __ ]
  827. 29:29I don't even know. I I'm going to look
  828. 29:31through all the data after. Combined
  829. 29:32with every single experiment I've rerun
  830. 29:35with this [ __ ] it's got to be like it's
  831. 29:38got to be in the thousands by now. The
  832. 29:40first completed run was a success, but
  833. 29:43not successful enough for my liking.
  834. 29:45After training, the average probability
  835. 29:47of the fly choosing the correct answer
  836. 29:49was 40.5% on stage one, 54.6% on stage
  837. 29:54two, and 48.7% on stage three. Multiply
  838. 29:57all of these, and the probability of a
  839. 29:59fully completed chain is 10.8%. This
  840. 30:02percentage is reflected in the test
  841. 30:04results after the fly's training was
  842. 30:06done. Of the 100 attempts, the fly fully
  843. 30:09completed the chain 11 times, meaning
  844. 30:11[music] that its success rate is 11%.
  845. 30:15The same 100 attempts done on the fly
  846. 30:17brain with no training was zero correct
  847. 30:19attempts. In fact, it never even made it
  848. 30:21past stage two and only gets correctly
  849. 30:23on stage one six times out of pure luck.
  850. 30:26So, why? Why did it fail to learn like
  851. 30:28we wanted to? Well, the memory plateaued
  852. 30:30again. The synapses participating in the
  853. 30:32learned odors reached a point where they
  854. 30:34could no longer weaken, so the fly
  855. 30:36couldn't learn from positive
  856. 30:37reinforcement anymore. Technically, I
  857. 30:39could remove the limit for memory
  858. 30:41entirely, but this can cause the fly to
  859. 30:43get stuck in an infinite loop of
  860. 30:45choosing the same thing and is much less
  861. 30:47realistic as real brain synapses have
  862. 30:49bounds. This was akin to hearing a song
  863. 30:51you really like and listening to it over
  864. 30:53and over again. Then later when your
  865. 30:54obsession with that song ends and you
  866. 30:56replay that song, it just doesn't hit
  867. 30:58the same anymore. I know you guys know
  868. 31:00what I'm talking about and in testing
  869. 31:02this did happen to me with the fly brain
  870. 31:04getting a positive dopamine reward for
  871. 31:06typing in test 1 2 3 with the bold tag,
  872. 31:08but on stage two it it just kept on
  873. 31:10doing the same thing over and over and
  874. 31:12over and over again despite not getting
  875. 31:14any dopamine from it anymore. It was
  876. 31:16just chasing that previous high for all
  877. 31:19of time. Additionally, everything on
  878. 31:21paper led me to believe that the fly
  879. 31:23already knew what answer was the correct
  880. 31:25one and the fault was mainly in the
  881. 31:27adapter. This is because the data
  882. 31:29suggested that it correctly learned the
  883. 31:31correct behavior, but was just choosing
  884. 31:33the wrong thing regardless, which I will
  885. 31:36get into in a second. I can also up the
  886. 31:38learning rate from 3% higher, but this
  887. 31:41would just make me hit the memory limit
  888. 31:42faster and would give too much dopamine
  889. 31:44to the fly for a successful action,
  890. 31:46which can cause it to infinitely do the
  891. 31:48same thing like before. Which to state
  892. 31:50again happened during previous training
  893. 31:52when I was experimenting. I was not
  894. 31:54satisfied with this experiment, so I'm
  895. 31:57going to keep doing and and keep
  896. 31:59adjusting things until the success rate
  897. 32:01is at least 50% instead of 11%.
  898. 32:05The main change I made was to allow the
  899. 32:07fly to sniff every decision multiple
  900. 32:09times before committing. Before, the
  901. 32:12experiment was designed in a way that
  902. 32:13had the fly choose the first thing that
  903. 32:15it smelled no matter what. This not only
  904. 32:17wasn't indicative of a real fly, but
  905. 32:20also frequently ignored all the training
  906. 32:22data which we just trained it on.
  907. 32:23Picture it like this. In real life, a
  908. 32:26fly can fly over to some food, smell it,
  909. 32:28decide it doesn't like the smell and fly
  910. 32:30away. So picture three plates of food
  911. 32:32next to each other. One is a plate of
  912. 32:34rice and that would immediately kill the
  913. 32:36fly. The second plate is a plate of
  914. 32:38cyanide which would have also
  915. 32:40immediately kill the fly. And the third
  916. 32:42plate is just honey. A real fly would
  917. 32:44smell the ricin plate, realize that it
  918. 32:46isn't edible, and keep flying around
  919. 32:48until it smells and finds the plate of
  920. 32:50honey, and only then would it start
  921. 32:52eating. With the experiment configured
  922. 32:54the way I had it configured before,
  923. 32:56[music] the fly would know that a plate
  924. 32:58of honey is nearby in the vicinity, but
  925. 33:00it wouldn't know the exact plate it's
  926. 33:02on. So, if it flew to the ricin plate to
  927. 33:04smell it, it would be forced to eat it
  928. 33:06since whatever plate it goes to smell is
  929. 33:08seen by the adapter as a definitive
  930. 33:10decision rather than just testing the
  931. 33:12waters. So, I took the exact same
  932. 33:14training data and just modified the
  933. 33:16adapter to allow the fly to sniff every
  934. 33:19plate five times before deciding which
  935. 33:21plate it wants to eat. And it goes
  936. 33:23without saying, by plate I mean the
  937. 33:24action it's taking to find the XSS
  938. 33:26vulnerability. This simple change was a
  939. 33:29resounding success. The success rate
  940. 33:32went from 11% all the way up to 94%
  941. 33:35With the training data disabled, its
  942. 33:37success rate was all the way back down
  943. 33:39to zero again. The odds of correctly
  944. 33:42guessing the chain 94 times is this
  945. 33:45absurd number that has 357 zeros before
  946. 33:48its first non-zero digit. It's safe to
  947. 33:51say that it would be mathematically
  948. 33:52impossible. This experiment proves that
  949. 33:55a fly is capable of context-dependent
  950. 33:58associative learning and action
  951. 34:00selection across multiple different
  952. 34:02sequences of environment. Terry has
  953. 34:04officially crossed the browser
  954. 34:06labyrinth. So, he earned himself a
  955. 34:08cigarette. Smoke up, Terry, and enjoy
  956. 34:10because the next challenge
  957. 34:13Well, the next [music] challenge is
  958. 34:14going to be your equivalent to the
  959. 34:16Dancer in Dark Souls 3, and you won't be
  960. 34:18allowed to use the dark hand to cheese
  961. 34:20it. You You're going to have to manually
  962. 34:22kill it with a great sword.
  963. 34:26>> [music]
  964. 34:31[music]
  965. 34:37[music]
  966. 34:50[music]
  967. 34:52>> Introducing Kioptrix Level 1, a
  968. 34:54deliberately vulnerable Linux server
  969. 34:56whose entire reason of existing is to be
  970. 34:58broken into. If you're into
  971. 35:00cybersecurity, Kioptrix is probably one
  972. 35:02of the first vulnerable boxes you've
  973. 35:04ever practiced on. Kioptrix has its own
  974. 35:07operating system, multiple network
  975. 35:09services, outdated software, and its own
  976. 35:11file system, and and everything else
  977. 35:13that an operating system has. A
  978. 35:15vulnerable box, or vulnbux, is basically
  979. 35:18a pre-built virtual machine
  980. 35:19intentionally filled with security
  981. 35:21vulnerabilities, so aspiring
  982. 35:23cybersecurity larpers can scan it,
  983. 35:25enumerate its services, exploit it, get
  984. 35:28it to do things unconsensually, and
  985. 35:30escalate their privileges to feel like
  986. 35:32Mr. Robot, effectively allowing them to
  987. 35:34learn real cybersecurity concepts and
  988. 35:36attacks without actually attacking real
  989. 35:39machines and breaking any laws. This is
  990. 35:41a massive jump from a login panel and
  991. 35:44XSS vulnerabilities. It's Terry's final
  992. 35:47boss. He's already withered and tattered
  993. 35:49from the hero's journey he's already
  994. 35:50been on, and this will be the Toguro of
  995. 35:53Terry's world. Actually, no. This will
  996. 35:55be the equivalent of fighting Prime All
  997. 35:57Might for little Terry over here. And
  998. 36:00Terry here, he doesn't have a quirk.
  999. 36:02Terry will be controlling his very own
  1000. 36:04machine this time, and it's going to be
  1001. 36:06Kali Linux. Why? Well, Terry is in the
  1002. 36:08skiddie larper era of his cybersecurity
  1003. 36:11journey. When I gave him a cigarette
  1004. 36:12earlier and he was having a smoke break,
  1005. 36:14I also had him watch Mr. Robot, and and
  1006. 36:17then he immediately installed Kali Linux
  1007. 36:19and started playing this song while
  1008. 36:21running sudo apt update. For
  1009. 36:23For the setup, I installed both Kali
  1010. 36:25Linux and Kioptrix and isolated them to
  1011. 36:28their own little [music] network. I then
  1012. 36:30made sure they can communicate with each
  1013. 36:32other and set up SSH for the Kali box
  1014. 36:34since commands will have to be sent from
  1015. 36:36my computer to the Kali machine. I then
  1016. 36:38made a snapshot of the Kioptrix box and
  1017. 36:41ran through it myself and recorded every
  1018. 36:43command I typed because I would need
  1019. 36:45those commands for the experiment. There
  1020. 36:46would now be 20 steps that have to be
  1021. 36:49completed in a sequence and 20 potential
  1022. 36:51choices per step. On the actual run of
  1023. 36:53the box, I enforced a 10 guess limit per
  1024. 36:56stage since even untrained, there are
  1025. 36:59only 400 potential choices meaning that
  1026. 37:01through pure repetition an untrained fly
  1027. 37:04can gain root access to the box. With
  1028. 37:06the 10 step limit, the odds of a
  1029. 37:08successful run on the fly untrained are
  1030. 37:10roughly 1 in 85 million which would take
  1031. 37:13anywhere between 181 years to 363 years
  1032. 37:17if each choice took 5 to 10 seconds. So
  1033. 37:20with all the commands, it was time to
  1034. 37:22train. I was hitting similar plateau
  1035. 37:25issues like with the XSS experiment
  1036. 37:27except each training attempt for this
  1037. 37:29one took around 18 hours minimum. So
  1038. 37:31getting this right took over [music] a
  1039. 37:33week and a half. One example is this
  1040. 37:36training run which took over 12 hours
  1041. 37:38and when put to the test after 2 hours,
  1042. 37:41Terry had still not passed stage two.
  1043. 37:43After more adjustment, I was so close to
  1044. 37:46giving up. Like you don't even know. I
  1045. 37:48was doing this for a week straight and
  1046. 37:50every training attempt I'd have to wait
  1047. 37:53like 12 hours at least just to test it
  1048. 37:56on the machine and let it sit for like 3
  1049. 37:58hours and then realize that nothing was
  1050. 38:01actually learned. It was so infuriating.
  1051. 38:04This wasn't a final boss for just Terry,
  1052. 38:06but also a final boss for me. But
  1053. 38:09through sheer perseverance and pushing
  1054. 38:11myself to the limit, we finally had a
  1055. 38:14breakthrough. The final training run
  1056. 38:16took 20 hours and 46 minutes to
  1057. 38:19complete. When put to the test on the
  1058. 38:21machine, these were the results. Okay,
  1059. 38:24Terry starting out with a basic ping
  1060. 38:26just to see if you could connect to the
  1061. 38:27box.
  1062. 38:29Okay, Nmap scan out.
  1063. 38:32We could see that Samba port is open.
  1064. 38:38Okay. Okay.
  1065. 38:41He's in the He's in the Metasploit
  1066. 38:43console.
  1067. 38:44To set the payload for for reverse
  1068. 38:46shell. Is this going to be it? Is this
  1069. 38:48going to be the reverse shell?
  1070. 38:51There we go.
  1071. 38:52Reverse shell.
  1072. 38:54Terry has gained root access.
  1073. 38:59The mainframe has been breached.
  1074. 39:02Okay, and confirm confirmation of root.
  1075. 39:05It is now official. Terry's just going
  1076. 39:07to leave a message here and he's going
  1077. 39:09to display on the actual Kioptrix
  1078. 39:12machine that they've been hacked by a
  1079. 39:14fly. And now he's thanking all of us.
  1080. 39:17He's thanking you for watching and he's
  1081. 39:18thanking me for teaching him.
  1082. 39:21You're welcome, Terry.
  1083. 39:23You've earned this victory. Terry
  1084. 39:24occasionally inputted the wrong
  1085. 39:26commands, but at the end of the day he
  1086. 39:28did it. I think he only put in the wrong
  1087. 39:30command like like three or four times
  1088. 39:32through the entire sequence. Terry
  1089. 39:34gained root access and is now a master
  1090. 39:36hacker. He was able to gain root access
  1091. 39:39through a Samba vulnerability. Samba is
  1092. 39:42a software that lets Linux and Unix
  1093. 39:44machine speak to the Windows SMB file
  1094. 39:46sharing protocol. The Kioptrix box
  1095. 39:48exposed its Samba service through TCP
  1096. 39:51port 139 and was running an old
  1097. 39:53vulnerable version of it that was
  1098. 39:54vulnerable to the trans to open buffer
  1099. 39:56overflow. Using this, Terry was able to
  1100. 39:59make a reverse shell with root access.
  1101. 40:02The hero's journey that Terry the fly
  1102. 40:04went on [music] was now over. Over the
  1103. 40:06course of the last 3 weeks, I grew quite
  1104. 40:09attached to Terry [music] the fly and
  1105. 40:10this victory was a bittersweet victory
  1106. 40:13because I knew I had to say goodbye to
  1107. 40:15my comrade [music]
  1108. 40:16who fought through this journey with me
  1109. 40:17until the very end. Except, I didn't
  1110. 40:20have to say goodbye because I can do
  1111. 40:22anything I put my mind to. I can achieve
  1112. 40:24anything I want just like Terry did. I
  1113. 40:26took his [ __ ] brain, put him on my
  1114. 40:28Linux desktop environment where he is
  1115. 40:31now free to roam and then live forever.
  1116. 40:33Terry is now [music] immortal. I even
  1117. 40:35gave him an infinite cigarette that
  1118. 40:37never runs out. A real dream come true.
  1119. 40:40Terry's reward for hacking the system is
  1120. 40:42eternal life, a cigarette, and dil-
  1121. 40:45dil-do being sent into his brain every
  1122. 40:4610 seconds for all of time. As long as
  1123. 40:49this computer survives, Terry lives on
  1124. 40:51forever with us. The Zuma viewers who
  1125. 40:53are always cheering him on. Thank you
  1126. 40:55for everything, Terry. I love you.
  1127. 40:56[music] W Terry in the comments,
  1128. 40:58everyone.
  1129. 41:01Thank you for watching, everybody. This
  1130. 41:03video was a combination of some of the
  1131. 41:05most fun I've ever had making a video
  1132. 41:07coupled with some of the most
  1133. 41:09frustration of any video. I hope you
  1134. 41:11found the rabbit hole of fly brains as
  1135. 41:14interesting as I did because
  1136. 41:15>> [music]
  1137. 41:15>> we're not just a cybersecurity channel
  1138. 41:18anymore. We are an everything tech
  1139. 41:20channel. All of us, [music] we're all
  1140. 41:22going to learn and skill max in
  1141. 41:23everything in tech, not just
  1142. 41:25cybersecurity. Do you know why? Because
  1143. 41:27you and me are limitless. We can quite
  1144. 41:30literally do anything as long as we just
  1145. 41:32keep trying and we chase that thing we
  1146. 41:35want with all of our hearts, just like
  1147. 41:37Terry did. I hope I explained the
  1148. 41:39concept and intricacies of a fly's brain
  1149. 41:41accurately and in a way that most of you
  1150. 41:44can understand. I was learning this as I
  1151. 41:46was going and I was just as confused as
  1152. 41:49many of you might be in the beginning of
  1153. 41:50this [music] whole journey, but let this
  1154. 41:52video be a message. You too can do
  1155. 41:54stupid little rabbit holes like this.
  1156. 41:56It's fun, [music]
  1157. 41:57you learn a lot. Literally any idea you
  1158. 41:59have in your head, don't even think
  1159. 42:01about it, just [ __ ] just do it. [ __ ]
  1160. 42:02all the preparation. You're not a
  1161. 42:04witcher, you don't have to make fit
  1162. 42:065,000 concoctions before you do
  1163. 42:08something. Just dive in and learn as you
  1164. 42:10go. You can do this with literally
  1165. 42:12anything in your life. You're never
  1166. 42:14going to be perfect, so stop waiting for
  1167. 42:17the perfect opportunity. Just go, man.
  1168. 42:19You got this. I believe in you. Thank
  1169. 42:21you to all the continued supporters of
  1170. 42:23this channel. You guys mean the world to
  1171. 42:24me, and I look forward to diving down
  1172. 42:26every rabbit hole in existence when it
  1173. 42:29comes to technology. This is just
  1174. 42:310.00001%
  1175. 42:33of what we're all capable of. If you
  1176. 42:36want to support the channel, buy the
  1177. 42:37merch, become a channel member, and
  1178. 42:39visit the description to see other ways
  1179. 42:41to support the channel. If you're broke,
  1180. 42:43your view and like are enough. Don't
  1181. 42:45fret. [music] Hello, this is editor Zuma
  1182. 42:47here. I just wanted to say that this
  1183. 42:49battle arena thing that you're seeing on
  1184. 42:51your screen right now is going to be the
  1185. 42:53new way that I'm going to showcase
  1186. 42:54channel member names. If you don't know,
  1187. 42:56>> [music]
  1188. 42:57>> I used to showcase channel member names
  1189. 42:58by just scrolling them across the screen
  1190. 43:00like this. But now, if you become a
  1191. 43:02channel member, you [music] can enter
  1192. 43:04the arena of these stick figures and
  1193. 43:07fight to the death with all of my other
  1194. 43:09channel members. The winner gets a
  1195. 43:10shoutout at the end of every video. Is
  1196. 43:12this just a cool way to entice all of
  1197. 43:14you to give me more money born from my
  1198. 43:16insatiable level of greed, or is this
  1199. 43:18just a cool addition to honor my channel
  1200. 43:20members and give them another awesome
  1201. 43:22reason to join that exceeds just
  1202. 43:25supporting the channel? I'll let you
  1203. 43:27decide that. Today's winner is
  1204. 43:29@HellsingAngels. [music]
  1205. 43:30Shoutout to HellsingAngels. To everybody
  1206. 43:32who lost, good luck in the next battle.
  1207. 43:34I hope to see more of you next time
  1208. 43:36[music] everybody fights. I also wanted
  1209. 43:39to showcase this beautiful piece of art.
  1210. 43:41This is my first ever fan art made by
  1211. 43:45@AnneIsDying [music]
  1212. 43:46on Twitter. Thank you, Anne. I'm going
  1213. 43:48to cherish this photo forever. If you
  1214. 43:50told me 1 year ago somebody would make
  1215. 43:52fan art of me, I wouldn't have believed
  1216. 43:54you. All of you watching this, if life
  1217. 43:56is tough, you're [music] all one good
  1218. 43:58decision away from changing your lives
  1219. 44:00for the better forever because one good
  1220. 44:02choice can spiral and snowball into is
  1221. 44:05great. From now on, I will showcase any
  1222. 44:08fan art I receive at the end of my
  1223. 44:10videos here with the artist ads as a
  1224. 44:12tribute to the artist. Subscribe to the
  1225. 44:14slob channel, follow my Twitter, buy my
  1226. 44:17merch. Thank you for watching everyone.
  1227. 44:19I hope you all have a phenomenal day.
  1228. 44:21Now click off this video and go learn
  1229. 44:23more things.
  1230. 44:27>> [music]
  1231. 44:33[music]
  1232. 44:40[music]

About this transcript

This page contains the full transcript of Can A Conscious Fly Brain Learn how to Hack? by dzuma, generated from the public captions YouTube serves with the video. The transcript has 8,047 words across 1,232 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.