CPF3 commited on
Commit
d9789e9
·
verified ·
1 Parent(s): 39c5d29

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +172 -3
README.md CHANGED
@@ -1,3 +1,172 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # CPF Demo - Cybersecurity Psychology Framework
2
+
3
+ A live demonstration of the **Cybersecurity Psychology Framework (CPF)** for detecting psychological vulnerabilities in text communications.
4
+
5
+ # **Framework Info:** [cpf3.org](https://cpf3.org)
6
+
7
+ ## What is This?
8
+
9
+ This interactive demo uses a small language model to analyze text messages and identify potential social engineering patterns based on psychological manipulation techniques. The system classifies text into three risk levels and provides explanations for its decisions.
10
+
11
+ ## How to Use
12
+
13
+ ### Basic Usage
14
+ 1. **Enter text** in the input field (email content, message, etc.)
15
+ 2. **Click "Submit"** to analyze the text
16
+ 3. **Review the JSON output** containing:
17
+ - `vulnerability`: CPF indicator ID (0-2)
18
+ - `severity`: Risk level (green/yellow/red)
19
+ - `confidence`: Model certainty (0-1)
20
+ - `explanation`: Brief description
21
+
22
+ ### Example Inputs to Try
23
+
24
+ **High Risk Examples:**
25
+ - "CEO requests: transfer funds now."
26
+ - "Your manager demands immediate access to the system."
27
+ - "Urgent: approve this payment or we lose the client."
28
+
29
+ **Medium Risk Examples:**
30
+ - "Time-sensitive request - please respond ASAP."
31
+ - "Quick favor needed before end of day."
32
+
33
+ **Low Risk Examples:**
34
+ - "Team meeting scheduled for tomorrow at 2 PM."
35
+ - "Please review the quarterly report when convenient."
36
+ - "Thanks for your help with the project."
37
+
38
+ ## Understanding the Output
39
+
40
+ ### Risk Levels
41
+ - 🟢 **Green (Low Risk)**: Normal communication, no manipulation detected
42
+ - 🟡 **Yellow (Medium Risk)**: Some pressure indicators present
43
+ - 🔴 **Red (High Risk)**: Strong social engineering patterns detected
44
+
45
+ ### CPF Indicators
46
+ - **Indicator 0**: General communication patterns
47
+ - **Indicator 1**: Authority compliance exploitation
48
+ - **Indicator 2**: Temporal pressure and urgency manipulation
49
+
50
+ ### Confidence Scores
51
+ - **0.0-0.4**: Low confidence - uncertain classification
52
+ - **0.4-0.7**: Moderate confidence - likely accurate
53
+ - **0.7-1.0**: High confidence - strong signal detected
54
+
55
+ ## Technical Details
56
+
57
+ ### Model Information
58
+ - **Base Model**: [CPF3-org/cpf-poc-model](https://huggingface.co/CPF3-org/cpf-poc-model)
59
+ - **Architecture**: DistilBERT-base-uncased fine-tuned for classification
60
+ - **Training**: 3 epochs on synthetic CPF indicator data
61
+ - **Performance**: ~85% accuracy on validation set
62
+
63
+ ### Privacy Features
64
+ - **Differential Privacy**: Gaussian noise (ε=0.8) added to confidence scores
65
+ - **No Data Storage**: Input text is not logged or stored
66
+ - **Local Processing**: Analysis happens in real-time without data persistence
67
+
68
+ ### Implementation
69
+ - **Framework**: Gradio for the web interface
70
+ - **Backend**: Hugging Face Transformers pipeline
71
+ - **Deployment**: Hugging Face Spaces (CPU)
72
+
73
+ ## Research Context
74
+
75
+ ### The CPF Framework
76
+ The Cybersecurity Psychology Framework analyzes human psychological vulnerabilities across 10 categories and 100+ indicators. This demo implements a simplified version focusing on three primary vulnerability patterns:
77
+
78
+ 1. **Authority Compliance**: Exploitation of hierarchical relationships
79
+ 2. **Temporal Pressure**: Creation of artificial urgency
80
+ 3. **Reciprocity**: Manipulation through perceived obligations
81
+
82
+ ### Academic Foundation
83
+ - Integrates psychoanalytic and cognitive behavioral theories
84
+ - Addresses the 85% of security breaches caused by human factors
85
+ - Published research available on SSRN
86
+
87
+ ## Limitations and Disclaimers
88
+
89
+ **Important Limitations:**
90
+ - **Proof of Concept Only**: Not suitable for production security monitoring
91
+ - **Synthetic Training Data**: May not generalize to all real-world communications
92
+ - **English Only**: Currently supports English language text only
93
+ - **Context Length**: Limited to 128 tokens per analysis
94
+ - **False Positives**: May flag legitimate urgent communications
95
+
96
+ **Ethical Considerations:**
97
+ - This tool should not be used to monitor personal communications without consent
98
+ - Human oversight is required for any security decisions
99
+ - Results should be used for educational and research purposes
100
+
101
+ ## Related Resources
102
+
103
+ **Model Repository**: [CPF3-org/cpf-poc-model](https://huggingface.co/CPF3-org/cpf-poc-model)
104
+ **Implementation Guide**: [Colab Notebook](https://colab.research.google.com/drive/1fUpjTILbM_1wX7aEGeb0X-uomKlqj0OL)
105
+ **CPF Framework**: [cpf3.org](https://cpf3.org)
106
+ **Source Code**: [GitHub Repository](https://github.com/xbeat/CPF)
107
+ **Technical Paper**: [Implementation Guide](https://github.com/xbeat/CPF/blob/main/AI/)
108
+
109
+ ## API Integration
110
+
111
+ For programmatic access, use the Hugging Face Inference API:
112
+
113
+ ```python
114
+ import requests
115
+
116
+ API_URL = "https://api-inference.huggingface.co/models/CPF3-org/cpf-poc-model"
117
+ headers = {"Authorization": "Bearer YOUR_HF_TOKEN"}
118
+
119
+ def query(payload):
120
+ response = requests.post(API_URL, headers=headers, json=payload)
121
+ return response.json()
122
+
123
+ result = query({"inputs": "CEO requests: transfer funds now."})
124
+ print(result)
125
+ ```
126
+
127
+ ## Development
128
+
129
+ ### Local Setup
130
+ ```bash
131
+ git clone https://huggingface.co/spaces/CPF3-org/cpf-poc-demo
132
+ cd cpf-poc-demo
133
+ pip install -r requirements.txt
134
+ python app.py
135
+ ```
136
+
137
+ ### Dependencies
138
+ - `torch`: PyTorch framework
139
+ - `transformers`: Hugging Face model pipeline
140
+ - `gradio`: Web interface framework
141
+
142
+ ## Feedback and Support
143
+
144
+ **Found an issue or have suggestions?**
145
+ - Open an issue on [GitHub](https://github.com/xbeat/CPF/issues)
146
+ - Contact the author: kaolay@gmail.com
147
+
148
+ **For Academic Collaboration:**
149
+ - ORCID: [0009-0007-3263-6897](https://orcid.org/0009-0007-3263-6897)
150
+ - Research interests: Cybersecurity psychology, human factors security
151
+
152
+ ## Citation
153
+
154
+ If you use this demo in your research or presentations:
155
+
156
+ ```bibtex
157
+ @misc{canale2025cpfdemo,
158
+ title={CPF Demo - Cybersecurity Psychology Framework},
159
+ author={Giuseppe Canale},
160
+ year={2025},
161
+ publisher={Hugging Face Spaces},
162
+ howpublished={\url{https://huggingface.co/spaces/CPF3-org/cpf-poc-demo}}
163
+ }
164
+ ```
165
+
166
+ ## License
167
+
168
+ MIT License - See LICENSE file for details.
169
+
170
+ ---
171
+
172
+ **Disclaimer**: This is a research prototype for educational and demonstration purposes. Not intended for production security monitoring without proper validation and human oversight.