Skip to content

Instantly share code, notes, and snippets.

View bambam2174's full-sized avatar
🌴
On vacation && just making myself learn and/or deepen new sklills & knowledge..!

Sedat Kilinc bambam2174

🌴
On vacation && just making myself learn and/or deepen new sklills & knowledge..!
View GitHub Profile
@bambam2174
bambam2174 / index.html
Created December 30, 2022 21:52
Project Management Dashboard UI
<div class="app-container">
<div class="app-header">
<div class="app-header-left">
<span class="app-icon"></span>
<p class="app-name">Portfolio</p>
<div class="search-wrapper">
<input class="search-input" type="text" placeholder="Search">
<svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" fill="none" stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" class="feather feather-search" viewBox="0 0 24 24">
<defs></defs>
<circle cx="11" cy="11" r="8"></circle>
.segment "HEADER"
.byte "NES", $1A ; Constant
.byte 2 ; 2 x 16KB PRG ROM
.byte 1 ; 1 x 8KB CHR ROM
.segment "CHARS"
;-------------------------------------------------------------
; CREATE SPRITES
;-------------------------------------------------------------
; The following creates one sprite. The following two bitmaps
; ___ _ __ ___ __ ___
; / __|_ _ __ _| |_____ / /| __|/ \_ )
; \__ \ ' \/ _` | / / -_) _ \__ \ () / /
; |___/_||_\__,_|_\_\___\___/___/\__/___|
; An annotated version of the snake example from Nick Morgan's 6502 assembly tutorial
; on http://skilldrick.github.io/easy6502/ that I created as an exercise for myself
; to learn a little bit about assembly. I **think** I understood everything, but I may
; also be completely wrong :-)
@bambam2174
bambam2174 / setuid-root-backdoor.md
Created December 4, 2019 01:43 — forked from dergachev/setuid-root-backdoor.md
How to use setuid to install a root backdoor.

Why You Can't Un-Root a Compromised Machine

Let's say somebody temporarily got root access to your system, whether because you "temporarily" gave them sudo rights, they guessed your password, or any other way. Even if you can disable their original method of accessing root, there's an infinite number of dirty tricks they can use to easily get it back in the future.

While the obvious tricks are easy to spot, like adding an entry to /root/.ssh/authorized_keys, or creating a new user, potentially via running malware, or via a cron job. I recently came across a rather subtle one that doesn't require changing any code, but instead exploits a standard feature of Linux user permissions system called setuid to subtly allow them to execute a root shell from any user account from the system (including www-data, which you might not even know if compromised).

If the "setuid bit" (or flag, or permission mode) is set for executable, the operating system will run not as the cur

@bambam2174
bambam2174 / ssh-forward-clipboard.md
Created December 4, 2019 01:40 — forked from dergachev/ssh-forward-clipboard.md
Forward your clipboard via SSH reverse tunnels

Exposing your clipboard over SSH

I frequently administer remote servers over SSH, and need to copy data to my clipboard. If the text I want to copy all fits on one screen, then I simply select it with my mouse and press CMD-C, which asks relies on m y terminal emulator (xterm2) to throw it to the clipboard.

This isn't practical for larger texts, like when I want to copy the whole contents of a file.

If I had been editing large-file.txt locally, I could easily copy its contents by using the pbcopy command:

@bambam2174
bambam2174 / GIF-Screencast-OSX.md
Created December 4, 2019 01:39 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application: