Coder Social home page Coder Social logo

allin's Introduction

ALLiN

English | 简体中文

asciicast

A comprehensive tool that assists penetration testing projects. It is a flexible, compact and efficient scan tool mainly used for lateral penetration of the intranet. The format of targets can be written by most of the various forms of link or CIDR and add any ports and paths to it.

Core developers
  • @Like0x
  • @Christasa
  • @CoColi
  • @MiluOWO
  • Penetration test only

    Features

    • python2.7 - python3.x support without and depend
    • Passively identify some frameworks, components of the site and over 1000 data of fingerprints
    • Passively identify whether the site is on the cloud
    • Almost support for import with the arbitrary format

    Some tricks

    • Using across platforms after compiling by pyinstaller
      • Compiling with low-level GLIBC in Linux to be compatible with more kernel versions
      • Compiling with python2 on windows to reduce the error of lacking DLL
    • Use it in VPS for resolving network problems
    • Eliminate the account information when scanning on the intranet

    Control the file through --project

    • res_alivedomain.txt will save all the report automatically
    • folder tree
      • result.txt
      • focuson.txt

    Use the following script to scan if you have many tasks

    target.txt

    <name of a company> xxx.com
    <name of another company> xxx.io
    
    #!/bin/bash
    
    while read line
    do
        project=`echo $line | awk -F " " '{print $1}'`
        host=`echo $line | awk -F " " '{print $2}'`
        echo $host,$project
        python AlliN.py --host $host -q "(domain=\"$host\" || cert=\"$host\"  || title=\"$project\") &&  country=\"CN\" && region!=\"HK\" && region!=\"TW\" && region!=\"MO\"" -m sfscan --timeout 6 --project $project -t 100
    done < target.txt

    Parameters

    --host

    Designate the domains or hosts

    Samples:

    --host 10.1.1.1
    --host 10.1.1.1-10.2.2.2
    --host 10.1.1.1/24 # any CIDR
    --host 10.1.1.1-255
    --host 2001:db8::/126 # any CIDR
    --host [2001:4860:4860::8888]
    --host 2001:db8::1-2001:db8::5
    --host <arbitrary format of the domain>
    

    --timeout

    Default is 3

    --timeout 3
    

    --ctimeout

    Timeout of pscan, default is 0.5

    --ctimeout 0.5
    

    --proxy

    --proxy http://127.0.0.1:8081
    --proxy http://user:[email protected]:8801
    --proxy socks5://127.0.0.1:1080
    --proxy socks5://user:[email protected]:1080
    

    pip install PySocks before using it

    --project

    Name of scan project, it will create a folder for saving results

    -p

    Designate the ports

    Samples:

    -p 80
    -p 80,443
    -p 8000-9000
    -p 80,8000-9000
    -p-  all of ports
    

    -f

    Name of the input file

    Samples:

    -f iplist.txt

    There are many formats of targets, such as

    http://www.baidu.com
    
    1.1.1.1/24
    
    www.baidu.com/asd
    
    www.baidu.com:80/123
    
    1.1.1.1/sads
    
    1.1.1.1:8080/123
    
    1.1.1.1-250
    
    1.1.1.1-1.1.1.250

    also can use with -p

    -u

    Need to use with --host or -f

    Sample:

    python AlliN.py --host "10.0.0.1-10.0.0.2" -u '/login/index.jsp' -p 80
    
    # It will send the requests as
    10.0.0.1/login/index.jsp
    10.0.0.2/login/index.jsp
    

    -H

    Including a custom header

    Sample:

    python AlliN.py -f domain.txt -H "Cookie: xxxxx; UxxxxxxxN=Sxxxxp"
    

    --uf

    -u from the file

    Sample:

    python AlliN.py --host "10.0.0.1-10.0.0.2" --uf urlpath.list -p 80
    
    urlpathlist:
    index.php
    index.jsp
    
    
    # It will send the requests as
    10.0.0.1/index.php => 10.0.0.1/index.jsp =>10.0.0.2/index.php => 10.0.0.2/index.jsp

    -t

    Number of threads, default is 200

    Sample:

    -t 200

    -o

    Name of the report file

    Sample:

    -o answer.txt

    --oJ

    Name of the report json file

    Sample:

    --oJ answer.json

    --nocert

    Scanning without cert identification.

    Sample:

    python AlliN.py --host 192.168.1.1/24 -p 443 --nocert

    Report with cert identification

    [  https://1.1.1.1  | Server:Microsoft-HTTPAPI/2.0 |  400  | Size:334 |  Bad Request  | Certs URL: uat1.sandbox.operations.dynamics.cn | DigiCert Inc  ]

    --nobar

    Close the processing bar

    python AlliN.py --host 192.168.1.1/24 --nobar

    --only-show

    Only displays the status codes which are allowed.

    Sample:

    --only-show 200,301

    --hidden

    Filter specifies status code.

    Sample:

    --hidden 404,400

    --hiddensize

    Filter the length of response

    Sample:

    --hiddensize 27,5367 # Filter the responses which length is 26 and 5367

    --dd

    Header scan model

    python AlliN.py --host 192.168.1.1/24 -p 443 --dd

    --tp

    Add an extra url scan of favicon.ico

    python AlliN.py --host 192.168.1.1/24 --tp

    --fs

    Size of each result number by fofa scan, default is 10,000

    -m

    Method of scan, default is tscan

    oxid

    Obtain the address of the remote host network card

    python AlliN.py -m oxid --host 192.168.129.130

    Port is 135

    [*] 127.0.0.1
            [->]hecs-xxxx0622130100
            [->]192.168.0.57
            [->]2001xxxxf57:ffc6
    {'127.0.0.1': ['hxx-x-medixx-2-win-2020xxxx', '192.168.0.57', '2001xxxx3f57:ffc6']}

    bakscan

    Scan the backup of a site

    python AlliN.py --host 192.168.1.1/24 -p 443 -m bakscan

    python AlliN.py --host 192.168.1.1/24 -p 443 -m bakscan -f dic.txt

    or use with the header model

    python AlliN.py --host 192.168.1.1/24 -p 443 -m bakscan --dd

    sfscan

    Combine with subscan and fofascan

    python AlliN.py -q 'domain="xx.com"' --host xxx.com -m sfscan

    Use for several domains

    python AlliN.py -q 'domain="xx.com"' --host xxx.com,yyy.com -m sfscan

    shscan

    Brute the key of shiro, only support CBC encryption currently

    python AlliN.py --host example.com -m shscan

    ddscan

    Fuzz subdomain, it will replace the [fuzz] to host

    Sample:

    python AlliN.py --host "www.[fuzz]baidu.top" -f test.txt  -m ddscan
    python AlliN.py --host "[fuzz].baidu.top" -f test.txt  -m ddscan
    python AlliN.py --host "[fuzz].baidu.top" -f test.txt  -m ddscan --dd

    hostscan

    Fuzz the host of a request body

    GET /xxx.html HTTP/1.1
    Host: [fuzz].example.com
    Accept-Encoding: gzip, deflate
    Accept: */*
    Accept-Language: en
    User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.183 Safari/537.36
    Connection: close
    

    Sample:

    python AlliN.py -m hostscan --host https://1.1.1.1 --domain example.com -f dic.txt --nocert
    

    vhostscan

    Similary with hostscan, change the IP with a correct host

    Sample:

    python AlliN.py -m vhostscan -f dict.txt --domain example.com --nocert
    

    fscan

    Fofa scan, reference https://fofa.info/api

    -q
    --fs # default is 10,000
    

    Sample:

    python AlliN.py -q domain="baidu.com" -m fscan --fs 200

    pscan

    Port scan

    Use the -p- to include all of the ports

    Sample:

    python AlliN.py --host 10.1.1.1/24 -p 80 -m pscan

    tscan

    Title scan, the default scan method

    Sample:

    python AlliN.py --host 10.1.1.1/24 -p 80

    17scan

    MS17-010 vulnerable scan

    Sample:

    python AlliN.py --host 10.1.1.1/24 -m 17scan

    dpscan

    DOUBLEPULSAR backdoor check

    Sample:

    python AlliN.py --host 10.1.1.1/24 -m dpscan --verbose

    nbscan

    nbtscan

    Sample:

    python AlliN.py --host 10.1.1.1/24 -m nbscan

    subscan

    Subdomain scan

    Sample:

    python AlliN.py --host "xx.com" -m subscan

    sscan

    tscan without header of rememberMe=xxx

    Sample:

    python AlliN.py --host 10.1.1.1/24 -p 80 -m sscan

    t3scan

    t3scan is a module of WebLogic information collection, it is based on the protocol of t3 and iiop

    Sample: python AlliN.py --host 10.1.1.1/24 -p 7001 -m t3scan

    Notice: Port is necessary

    uncd

    Decode model

    Include powershell encode 、bash encode 、 F5 decode

    Sample:

    python AlliN.py -m uncd -e f5 -s 185903296.21520.0000

    -e f5 f5decode
    -e pw powershell encode
    -e bh bash encode
    

    0708scan

    CVE-2019-0708 vulnerable scan

    Sample:

    python AlliN.py --host 192.168.1.1/24 -m 0708scan -p 3389

    ICMPT

    NAT traversal

    Nedd privileged of icmp Ping

    There two steps to start it - server and client

    first step: type python AlliN.py -m icmpt on your own VPS

    next step: In client, type python AlliN.py -m icmpt --sip vps --cip 127.0.0.1 --cport 80

    It will have the following content after you finish the second step

    Accpet new client from : 14178 192.168.148.1
    Your server port is :33127
    

    And the 33127 port of your VPS is the correct 80 port of the client

    Sample:

    python AlliN.py -m icmpt --sip vps --cip 127.0.0.1 --cport 80
    
    Then you can browse vps_ip:36267 to access target_ip:target_port
    

    allin's People

    Contributors

    christasa avatar like0x avatar

    Stargazers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    Watchers

     avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

    allin's Issues

    刚刚使用了一下

    师傅们好,上次可能没描述清楚,-f选项的需求是 python allin.py -f host.txt -m fscan 或者调用其他的扫描模块,感觉实现确实有点麻烦,感觉可以把title和host查询分开或者只做txt里一列host的fofa查询语句,师傅们没时间实现也没关系,这个项目已经很好了!!还有一个问题是二进制的allin怎么配置key呢。。谢谢各位师傅

    多模块运行报错

    9:39:29 › sudo python3 AlliN.py -p 80 -f 1.txt -m tscan,dpscan,nbscan,t3scan,0708scan,pscan,17scan,gtscan,bakscan --dd --nocert
     
    
     █████╗ ██╗     ██╗     ██╗███╗   ██╗
    ██╔══██╗██║     ██║     ██║████╗  ██║
    ███████║██║     ██║     ██║██╔██╗ ██║
    ██╔══██║██║     ██║     ██║██║╚██╗██║   v2.4.2 #3.7.7
    ██║  ██║███████╗███████╗██║██║ ╚████║
    ╚═╝  ╚═╝╚══════╝╚══════╝╚═╝╚═╝  ╚═══╝
     
    
    
     Timelocal:  Mon Sep 11 09:39:59 2023 |  Threads:  200
     		[+] tscan,dpscan,nbscan,t3scan,0708scan,pscan,17scan,gtscan,bakscan mode 
    Traceback (most recent call last):
      File "AlliN.py", line 9564, in <module>
        AG3(args.f, args.m, listPort, args.t, "file", args.o, args.u)
      File "AlliN.py", line 9201, in AG3
        hr, task_list, method, listPort, threadnum, outfile, urlpath
      File "AlliN.py", line 9125, in aliveThreadControl
        progress.dones()
      File "AlliN.py", line 4783, in dones
        self()
      File "AlliN.py", line 4761, in __call__
        percent = self.current / float(self.total)
    ZeroDivisionError: float division by zero
    

    [ - ] KeyError('size')

    运行环境python 3.9报错如下:
    Waiting for fofa ...
    [ - ] KeyError('size')
    xxxxxx(手动码) | PASSIVE Request error | CERT Request 1 | VTS Request error |

    [ >>>>>>>>>>>>>>>>>>>>>>>>>>>>>> ] 2/2 (100%) 0 to Go

    Task completed

    关于json文件输出

    我在运行端口扫描,保存结果文件时提示以下错误

    Exception in thread Thread-2:
    Traceback (most recent call last):
      File "/usr/lib/python3.8/threading.py", line 932, in _bootstrap_inner
        self.run()
      File "AlliN-2.1.8-in.py", line 7807, in run
        args[2], origin,
    UnboundLocalError: local variable 'origin' referenced before assignment
    

    我在7807行找到了他,发现这个当端口不是443时,origin和n变量未被赋予值;

                    if JSONFILE:
                        wpinfo = ("{\"%s\":{"
                                "\"certs_origin\": \"%s\","
                                "\"certs\": \"%s\","
                                "\"port\": \"%s\","
                                "\"host\": \"%s\","
                                "\"type\": \"%s\"}}" % (
                                    args[2], origin,
                                    n, certs,
                                    args[2], service(int(n))
                                ))
    

    我将这个if判断调整至上方for循环中,程序可以正常运转。

                    for n in port_list:
                        if open_ports[n] == "open":
                            if n == "443":
                                certs , origin = getHttpCert(ip, 443)
                                print("[ %s     open     %s     %d/tcp CertDomain:%s %s]" % (service(int(n)), ip, int(n), certs, origin) + " "*30 + "\n")
                                wpinfo = "[" + service(int(n)) + " | open | " + ip + "  |  " + str(n) + " | " + certs + " | " + origin + "]\n"
                                if JSONFILE:
                                    wpinfo = ("{\"%s\":{"
                                        "\"certs_origin\": \"%s\","
                                        "\"certs\": \"%s\","
                                        "\"port\": \"%s\","
                                        "\"host\": \"%s\","
                                        "\"type\": \"%s\"}}\n" % (
                                            args[2], origin,
                                            n, certs,
                                            args[2], service(int(n))
                                        ))
                            else:
                                print("[ %s     open     %s     %d/tcp ]" % (service(int(n)), ip,int(n)) + " "*40 + "\n")
                                wpinfo = "[" + service(int(n)) + " | open | " + ip + "  |  " + str(n)+ "]\n"
                                if JSONFILE:
                                    wpinfo = ("{\"%s\":{"
                                        "\"port\": \"%s\","
                                        "\"host\": \"%s\","
                                        "\"type\": \"%s\"}}\n" % (
                                            args[2], n,
                                            args[2], service(int(n))
                                        ))
    

    一个小建议

    建议在后续版本中将标红的高危指纹单独统计并在最后的结果中显示出来,方便用户查看当前结果是否存在标红的高危指纹。

    大师傅能一直更新下去吗

    我是该项目的忠实粉丝,极高的自由度和近乎完美的功能。
    1.但是突然我发现如果目标太多 给他一个所有目标根域名的列表就不能调用模块去批量查询
    python3 Allin.py -f y111.txt -m sfscan
    这一点在红蓝对抗中比较节省时间
    2.hunter平台也可以弄一个模式出来跟fscan 模式一样就好,如果能优化一些哪就更完美了
    3.能否支持输出csv和xslx格式的文件呢
    不管更不更新都先谢谢大佬写出这么好用的工具

    PASSIVE Request error

    填写了Riskiqkey之后为什么依然搜索不到?是格式不对吗?
    keylist = ["8f4778b8a661702019c304f3a2f13696b2b36d49729aa34fa060bfxxxxxxxxxx"]

    -p参数有bug

    端口范围的写法处理有bug,仅录入到最后一处的端口范围。
    举例,使用-p 80-90,443,8000,8080-8088时,会变成仅扫描最后一处使用横杠的8080-8088和443,8000端口。而前面的80-90端口会被忽略掉。

    添加指纹,中文报错

    自己添加指纹,"":"",第一个”“里面不能是中文,不然就报错 if self.trie[u].child[ids] == 0:
    image

    Recommend Projects

    • React photo React

      A declarative, efficient, and flexible JavaScript library for building user interfaces.

    • Vue.js photo Vue.js

      🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

    • Typescript photo Typescript

      TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

    • TensorFlow photo TensorFlow

      An Open Source Machine Learning Framework for Everyone

    • Django photo Django

      The Web framework for perfectionists with deadlines.

    • D3 photo D3

      Bring data to life with SVG, Canvas and HTML. 📊📈🎉

    Recommend Topics

    • javascript

      JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

    • web

      Some thing interesting about web. New door for the world.

    • server

      A server is a program made to process requests and deliver data to clients.

    • Machine learning

      Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

    • Game

      Some thing interesting about game, make everyone happy.

    Recommend Org

    • Facebook photo Facebook

      We are working to build community through open source technology. NB: members must have two-factor auth.

    • Microsoft photo Microsoft

      Open source projects and samples from Microsoft.

    • Google photo Google

      Google ❤️ Open Source for everyone.

    • D3 photo D3

      Data-Driven Documents codes.