最新的backtrack5(bt5)官方网站已经提供下载,backtrack5是基于ubuntu Lucid LTS. 内核2.6.38开发的,完全开源并和GPL兼容。

Backtrack 中文网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

扫一扫,访问微社区

搜索
查看: 1089|回复: 1

[其他] 使用 Mac nmap 7.50 IOS

[复制链接]
谭鹏涛
连沛珊
料:
Build Nmap 7.50 for IOS 6.1.3

OS X 10.9.5
Xcode: 5.0.2
IOS SDK: 6.1 (取自Xcode 4.6.3)

xcode 4.6.3: Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk 到
xcode 5: Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk

Mac 必安 brew
然後安 dpkg 套件

打端C⒁韵麓a上:
  1. IOSDEVROOT=$(xcrun --sdk iphoneos --show-sdk-platform-path)/Developer
  2. IOSSDKROOT=$(xcrun --sdk iphoneos6.1 --show-sdk-path)
  3. export SDKROOT=$IOSSDKROOT
  4. export CC="$(xcrun -f gcc) -arch armv7"
  5. export CXX="$(xcrun -f g++) -arch armv7"
  6. export LD=$DEVROOT/usr/bin/ld
  7. export AR=$DEVROOT/usr/bin/ar
  8. export AS=$DEVROOT/usr/bin/as
  9. export NM=$DEVROOT/usr/bin/nm
  10. export RANLIB=$DEVROOT/usr/bin/ranlib
  11. export CFLAGS="-I$SDKROOT/usr/include/ -arch armv7"
  12. export LDFLAGS="-L$SDKROOT/usr/lib/ -arch armv7"
  13. export CPPFLAGS=$CFLAGS
  14. export CXXFLAGS=$CFLAGS
复制代码


# iOS sdk include copy
  1. MACSDKROOT=$(xcrun --sdk macosx --show-sdk-path)
  2. cp -r $MACSDKROOT/usr/include/net $IOSSDKROOT/usr/include/
  3. cp -r $MACSDKROOT/usr/include/netinet $IOSSDKROOT/usr/include/
  4. cp -r $MACSDKROOT/usr/include/sys/_types $IOSSDKROOT/usr/include/sys/
  5. cp -r $MACSDKROOT/usr/include/i386 $IOSSDKROOT/usr/include/
  6. cp -r $MACSDKROOT/usr/include/libkern/i386 $IOSSDKROOT/usr/include/libkern/i386
  7. cp -r $MACSDKROOT/usr/include/mach/i386 $IOSSDKROOT/usr/include/mach/
复制代码



# Install openssl-1.0.2l Libs to SDK
  1. wget --no-check-certificate https://github.com/Backtrackfans/Darwin/raw/deb/openssl-1.0.2l.tar
  2. tar vxf openssl-1.0.2l.tar -C $SDKROOT/
复制代码

  1. wget --no-check-certificate https://nmap.org/dist/nmap-7.50.tar.bz2
  2. tar jxvf nmap-7.50.tar.bz2
  3. cd nmap-7.50
复制代码


######### iOS armv7 patch #########
  1. sed -i "" 's/ppc64/armv7/g' configure
  2. sed -i "" 's/-arch x86_64 -arch i386/-arch armv7/g' libpcap/configure.in
  3. sed -i "" 's/-arch x86_64 -arch i386/-arch armv7/g' libpcap/configure
复制代码


# configure for armv7
  1. ./configure --host=arm-apple-darwin --target=armv7-apple-darwin --build=armv7-apple-darwin \
  2. --prefix=/usr/local \
  3. --with-libpcap=included \
  4. --with-liblua=included \
  5. --with-openssl=/usr/local/openssl/1.0.2 \
  6. --with-pcap=bpf \
  7. --without-nmap-update --disable-universal --without-zenmap --without-ndiff
复制代码


手有薷
* libdnet-stripped/config.status
h除 ${LIBOBJDIR}memcmp$U.o

* libdnet-stripped/Makefile
h除 ${LIBOBJDIR}memcmp$U.o

* libpcap/config.h
h除 #define LBL_ALIGN 1
或改 /* #undef LBL_ALIGN */


  1. make
  2. make install DESTDIR=nmap-7.50
复制代码


# Make deb
  1. cat << EOF > DEBIAN/control
  2. Package: nmap
  3. Version: 7.50
  4. Architecture: iphoneos-arm
  5. Maintainer: Debian Security Tools Packaging Team <pkg-security-team@lists.alioth.debian.org>
  6. Installed-Size: 27235
  7. Depends: libpcap, openssl-1.0
  8. Section: net
  9. Priority: extra
  10. Homepage: http://nmap.org/
  11. Description: The Network Mapper
  12. Nmap is a utility for network exploration or security auditing. It
  13. supports ping scanning (determine which hosts are up), many port
  14. scanning techniques, version detection (determine service protocols
  15. and application versions listening behind ports), and TCP/IP
  16. fingerprinting (remote host OS or device identification). Nmap also
  17. offers flexible target and port specification, decoy/stealth scanning,
  18. sunRPC scanning, and more. Most Unix and Windows platforms are
  19. supported in both GUI and commandline modes. Several popular handheld
  20. devices are also supported, including the Sharp Zaurus and the iPAQ.
  21. EOF
复制代码

  1. dpkg-deb --build --uniform-compression -Zgzip nmap-7.50 nmap_7.50_iphoneos-arm.deb
复制代码


完成品
https://github.com/Backtrackfans/Darwin/raw/deb/nmap_7.50_iphoneos-arm.deb

依 openssl 1.0.2
https://github.com/Backtrackfans/Darwin/blob/deb/openssl-1.0_1.0.2l_iphoneos-arm.deb


手C必越,K使用cydia安 openssh 套件
IOS安apt套件方法: https://raw.githubusercontent.co ... IOS/APT.For.IOS.txt

手C接WIFI 在Mac打端C
上 nmap_7.50_iphoneos-arm.deb 到手C
  1. scp nmap_7.50_iphoneos-arm.deb root@手CIP:/tmp/
复制代码


使用ssh登入IOS
  1. ssh root@手CIP
复制代码


安nmap
  1. cd /tmp
  2. dpkg -i nmap_7.50-1_iphoneos-arm.deb
  3. apt-get install -f
复制代码





+1
1090°C
1
  • hiharry009
过: 他们
佳初
闳元白
谢谢楼主   
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

BackTrack是一套专业的计算机安全检测的Linux操作系统,简称BT。BackTrack 是一个基于Ubuntu GNU/Linux的发行版本,主要用做数字取证和入侵测试。它的名字引用自回溯法(backtracking)。BackTrack 给用户提供了大量功能强大但简单易用的安全工具软件。BackTrack还支持Live CD和Live USB启动方式,用户可以直接从移动介质启动该系统而不用将系统安装在硬盘上。BackTrack被设计成一体化的旨在安全审计用的livecd,曾经它是被最广泛采用的渗透测试框架并被世界各地的安全社区所使用。现在,BackTrack已被Kali Linux所代替,BT将不再维护。
快速回复 返回顶部 返回列表